There is a distinction between murder and killing. Murder stems from animosity, hatred, jealously and evil in the heart. Killing on the other hand, can be done without any malice or evil in the heart. I have no desire to harm or murder anyone, yet i would kill someone to protect my family, for instance. I believe the same applies to the military. God knows the military exists, He's used military men many times throughout history. He knows some Christians will have a desire to serve their country in a military manner. And He understands that killing may be a part of that. I think long as the person isn't joining the military to be able to kill, then there is nothing wrong with it.