Joining the Military to help get a Masters

At this point, I am running out of options. Been stuck in job seeking hell and I am ready to do practically anything to help make getting any further in my career path easier. I can't even get basic jobs near me to just earn some extra money past what I make now.

I graduated with a degree in Astrophysics and cannot find a job that I can even remotely qualify for, nor has getting into a Masters program been easy either.

Would joining the military be a viable route to get a Masters degree and get some useful experience without getting trapped by needless contracts and being even more limited than I already am?