If you can't sort out what gender you are, you don't need to be in the military. Your mind needs to be razor focused on your assignment.  Having your head screwed correctly on is indeed necessary for military service.