Only the earnings are taxed. Also, the Cadet won't have access to that money until they get their top off.Military academies are NOT qualified educational institutions per 529 regs.
However the 10% penalty is waived for SA attendees.
Withdraw the money and use it if/as needed including the $2K deposit, pay taxes on earnings only at cadet tax rate.