GREAT question! But first, thank you for your service! At our house, we are both "retired" military, and we understand exactly where you're coming from.
The commandment actually uses the Hebrew words "lo tr'tzach" which literally means "not murder" the context of which is that we don't have the right to kill anyone with malice. Killing is permitted in circumstances of war and if required to protect ourselves or someone else. The root of the Hebrew word tr'tzach is "r'tzach" and that form of the verb "murder" is never used in scripture in the context of war. And the legitimate authorities of the community are permitted to apply capital punishment for certain crimes.
So, to answer your question, this commandment refers to the arbitrary killing by individuals. In other words, we're not supposed to go around killing people just because we're angry with them. Remember, this command was officially put out at Sinai during the Israelites 40 years in the desert - yet we see YHWH commanding His people to go in and kill entire cities of people and to stone people to death for various infractions, AFTER He officially gave "thou shalt not kill."
Back in "biblical times," death was the punishment for disobeying YHWH's Torah, and when He commanded the killings, it was for a reason (His people willfully disobeying His commands, and/or those who outright rejected Him). YHWH opposes those who will not be His - and that has never changed. Today, thanks to the atoning death of Yeshua who was our final SIN Sacrifice, people aren't being put to death for infractions anymore. However, they WILL stand before YHWH to give an account on Judgment Day.
Here's John's response to soldiers in Luke 3:14 - "and the soldiers would ask him and say, "What should we do also?" He said to them, "Do no violence to man and do not accuse anyone. This is sufficient for you for your wages."..."Do no violence to man" refers to the unrighteous acts of rape, wanton destruction of property and stealing. It was understood that a soldier had to kill an enemy combatant.
You have a real dilemma because we are commanded to obey our leaders and the "laws of the land" (although the pertinent scriptures referred to GODLY leaders, not "carnal" ones). Being in the military you are under an obligation to obey your civil leaders and LEGAL orders. In the Iraq and Afghanistan wars (and all other wars throughout our military history) these actions were sanctioned by our government and soldiers are and were obligated to carry those orders out. Unfortunately, those leaders aren't necessarily following YHWH.... So, what to do? We don't have the answer for that and will leave it up to you to decide.
Hebrews 13:17 Obey your leaders and submit to them, for they keep watch over your lives, as people who will have to render an account. So make it a task of joy for them, not one of groaning; for that is of no advantage to you.
Now, of course, as stated, the above meant GODLY leaders, not carnal ones. At the same time, we have Yeshua's comment, "Render to Caesar the things that are Caesar's, and to God the things that are God's" (Mark 12:13-17; the same passage appears, slightly modified, in Matthew 22:15-22 and Luke 20:20-26). This is interpreted by most people to mean that in secular matters follow the law of the land, but for spiritual matters follow the law of God. Like most passages, it can be twisted pretty much out of shape by extremists on either side of an argument.
Many people attempt to use Romans 13:1-7 as proof that we are to follow ANY leader, no matter what. But again, what that passage was referring to is leaders who belong to YHWH, not to "the world."
Romans 13:1. Let every soul be subject to the authorities of government. For there is no authority which is not from Elohim: and the authorities which exist are established by Elohim. 2. He therefore who opposes the authority, opposes the establishment of Elohim; and they who oppose them will receive judgment. 3. For judges are not a menace to good deeds, but to evil deeds. Would you then not be afraid of the authority? Do good, and you will have praise from it. 4. For he is the minister of Elohim; but it is to you for good. But if you work evil, be afraid; for he is not girded with the sword in vain; for he is a minister of Elohim and an avenger of wrath to them that do evil things. 5. And therefore, it is necessary for us to be obedient, not only on account of wrath, but likewise on account of our consciences. 6. For this cause also you pay tribute money; for they are the ministers of Elohim, established for these same objects. 7. Render therefore to every one as is due to him; head tax, to whomever accounts for it; and duties to whomever collects taxes; and respect, to whom respect is due; and honor, to whom honor is due. (AENT)
The false Church system twists this verse so that Christians will submit to the authority of false governments who in turn support the false religious hierarchies. In reality, Paul makes this statement in the context of YHWH's Commandments in Torah; "You shall not follow a multitude to do evil; neither shalt you answer in a cause to decline after many to wrest judgment." (Sh'mot/Exodus 23:2)
If the "majority" allows evil men in "government" and within "the church" to go unpunished, the evil becomes punishable upon the majority. For example, democracy is thought to work by majority vote, but in reality democracies are easily manipulated by power hungry minorities who control media, ballot boxes, polls and "public opinion." When the majority fails to act against evil, the hierarchy continues to further enslave it's victims (citizens).
Many are discovering that what they believed to be a Democractic government is in fact an Oligarchy of organized criminals. The false Church system and all false government thrives on "double think" by putting forth an archetype (religious tradition or legislation by "majority" that "sounds reasonable" but is certainly not truth) and markets its theologies and laws as though it is a collectively inherited or accepted ideal.
This is extremely high level rebellion against YHWH and must be prosecuted or all of humanity will suffer. "You shall not answer in a cause to decline after many." We must never fear evil men, decline to them, or pretend evil will go away on its own. Pray, speak and act against all manner of evil. Mashiyach calls all souls everywhere to join together in righteousness and bring Peace, Justice and Equality to all peoples, of all religions and socio-economic situations. See Matthew 22:21.
Hopefully, this has helped in some small way. We can truly empathize, because you ARE in the military and subject to obey your leaders. As such, you are in between that proverbial "rock and a hard place."