Someone has said that timing is everything. In war killing is accepted as right, and moral, and often as heroic. This is not new, it was true in ancient Israel, especially as they came into the promised land.
Killing can be right or wrong depending on the moral factors involved.
Killing for your country is only right if what your country is doing is right. Little is said about the profession of arms in the New Testament, but there are a few interesting references. Jesus met a soldier who believed in him, and in no way condemned his profession, but instead used him as an example of great faith. For I myself am a man under authority, with soldiers under me. I say to my servant, 'Do this,' and he does it.