Does anything prevent the army from simply discharging him?
Nope. Officers serve at the pleasure of the President. He could, at virtually anytime, be administratively separated - that is to say that he could be discharged without facing any kind of judicial or non-judicial punishment.
But he has, apparently, filed an Article 138 complaint, which was rejected (appropriately) by command for deficiency. If he actually disobeys an order, he can and probably will be discharged. If he has already pronounced his intentions to disobey orders, he could still be facing court-martial for conduct unbecoming (Art. 133). Essentially, he's placing his retirement and his rank in peril, with this course of action.