You could become a conscientious objector, and it’s even possible to get out of the military this way (my father did).
Unfortunately, the Selective Service does not recognize conscientious objectors when there is not a draft so it’s hard to get that status now.