If you're active duty in the military, GTFO ASAP! They're already melting down enough as it is
It doesn't work like that! You leave, you are at risk of arrest by the military. It's called "desertion" and/or being "AWOL". That can land you in military prison.
There is a process, but you can't just walk away like you can with a civilian job.