Unfortunately, while active-duty military, you have no recourse when given a direct order.
More typically, refusal to follow the same, results in things arguably worse than getting kicked out. Like Military Prison.
So said the Nazis who were tried at Nuremberg.
One cannot be compelled to obey an unlawful order.
(That none of these service members were tried under the UCMJ for disobedience of a lawful order is all the evidence we need of how "lawful" such an order could have been.)