The only saving grace you may have is that you may be able to take advantage of the sanctuary regulations to stay in the Navy but refuse DH orders. When do you rotate to DH School? That's a 6-12 month pipeline depending on what job you're going to do and how backed up SWOS is. That may put you around the 19 year mark when you report to your ship. It's entirely possible that instead trying to avoid your DH tour, you go through with it and instead put your retirement papers in shortly after arriving. That will be a poison pill and expect everyone to hate you for it, but if you don't care it's another possible COA.
Also, you could request to resign your commission and return to enlisted life. I've seen this for Mustangs that FOS'ed twice and were allowed to spend their last couple of years as enlisted so they could still retire. I'm not sure how this works though, so you'd have to talk to someone at PERS, probably in the POCR office (IIRC that's PERS-9#).
It's very possible that being "Needs of the Navy" results in sea duty anyway at either a Type 3 sea duty like NECC or a Super DIVO tour. I've seen weird things happen with people like that in the SWO community. Very rarely is it fun.
Are they still doing the DH shuffle? When I left the SWO community a few years ago, PERS messed up assignments and people ended up getting randomly assigned to DH jobs so you had officers who went through the WEPS/CSO pipeline who then got orders to be a CHENG, officers who thought they were going CRUDES only to end up with orders to a Gator or vice versa, and people who thought they were going to Mayport ended up with orders to Japan. Very often this switch up happened in the latter half of DH School and left many DHs very bitter. I'm not sure if that's still happening but it's very possible.