If the commandment states: "You shall not kill." We have to ask, Kill what? A dog? A flea? A microbe?
To command, "You shall not kill a human being," does not take into consideration the concept of having to kill somebody for justice to be upheld.
When speaking about not killing a human being, even in the King James Bible, the idea implicit in the statement is murder—not merely killing another person.
Murder implies killing with intent, without a socially verifiable just motive, and not killing somebody by accident.
Now your question as to whether it is a sin to go to war, comes across as one of those "gotcha" attempts, especially when you add: Are all soldiers who have killed an enemy, sinner's in the eyes of God?
Anybody who has read the Bible with the intent to understand it, knows that the Bible states: All have sinned and fallen short of the glory of God. Therefore, regardless of whether soldiers go to war, they are all sinners who are condemned by their unrighteous actions while growing up and are in need of redemption.
Fortunately, Jesus has died and paid the price for redemption. Was Jesus murdered or killed? If Jesus had been killed, that is executed for wrongdoing, then His death would have been just. If not, then Jesus was murdered, and those who killed Him were unjust. Nevertheless, Jesus permitted Pilate to do what he liked. Being a politician, Pilate decided to appease the Jews that demanded Jesus death.
However, the unjust killing of Jesus has turned into the redemption of sinners. Those who accept Jesus' death as a substitute for their own are now permitted right standing before the Judge of all men. Each one who accepts Jesus' death as the price for his or her own sins, by faith, have the right to receive the inheritance that has also been willed to everyone who desires to be reconciled with the Creator of the Universe.
The distinction between a just killing and a murder is evidenced in the final judgment that each individual has to face if they reject the gospel message that is even found in the Ten Commandments.
Many don't want to avail themselves of eternal salvation because they have such a high opinion of themselves. Instead of being killed, the Bible says that their worm will never die. Unlike the first death (biological) the second death is separation from God, not annihilation. The smoke from the flames (not the stench of their conceit and self-righteousness) will be a reminder of what happens to the self-righteous forever. They will forever exist, only in a state of punishment.
- And the devil who had deceived them was thrown into the lake of fire and sulphur where the beast and the false prophet were, and they will be tormented day and night for ever and ever....Then Death and Hades were thrown into the lake of fire. This is the second death, the lake of fire; and if any one’s name was not found written in the book of life, he was thrown into the lake of fire. (Revelation 20:10, 14-15)
- And do not fear those who kill the body but cannot kill the soul; rather fear him who can destroy both soul and body in hell. (Matthew 10:28)
- And if your eye causes you to sin, pluck it out; it is better for you to enter the kingdom of God with one eye than with two eyes to be thrown into hell, where their worm does not die, and the fire is not quenched. (Mark 9:47-48)
As to the question, "Is it a sin to go to war?" There are two answers. One has to do with Israel and the other to do with Christians.
Ideally, Israel was to be a nation where righteousness dwelt. From an Earthly perspective, Israel was to rule with God and demonstrate the benefits of being righteous. God ordained that those who sinned were to be eradicated. Under these conditions, righteous destruction of evildoers was warranted.
As for Christians, war is out of the picture (unless it is spiritual). Christians, who are truly walking with God, will be imprisoned, tortured,or burned at the stake by those who hate the truth. For the Christian, this is not a problem. Neither should death be a concern for Christians. For Christians have already entered into eternal life and they have the assurance abiding within themselves that they have received the promised Holy Spirit. Why would a Christian go to war? Christians are meant to be lights to the world.
Unfortunately, we see through history that many people claiming to be Christians have gone to war. Many evils have been done in the name of Christianity. Nevertheless, each one will be judged according to what each has done. Moreover, every careless word that a person utters, will bring a person into account.
Fortunately, the Grace of God is such that every person who accepts that Lord Jesus Christ has died for his or her sins, and genuinely trusts in Him, that person will be saved from eternal punishment. This is because God overlooks ignorance and justifies those who have faith in Jesus' sacrifice of Himself on their behalf.
All soldiers are sinners in the eyes of God; the same as the person who merely deceives someone by telling a white lie is an ungodly person. The real issue is whether those who point the finger at others are able to recognize the three fingers that point back at them. If they do, there is hope that they will recognize that only breaking one of the Ten Commandments is sufficient to fall short of the glory of God and qualify as an unrighteous sinner—someone who is ungodly.
Spiritual warfare is not sin for the saints. It is sin for those who oppose the saints. So when you speak of soldiers going to war, there is a need to differentiate between physical warfare and spiritual warfare. The former is to kill humans in the flesh. The latter is to save souls by defeating the Devil and his hordes in the spirit realm.
There is a war taking place for the souls of men and women. Christians who are soldiers in this war can thwart the Devil's plans by winning souls for Lord Jesus Christ, so they can come to an understanding of why they were born and what God has in store for them. If salvation begins with the Joy of Salvation, how much better shall it be, when an Infinite Creator, who has an infinite array of ideas to create that have not been created yet, begins to take us on an adventure for eternity.
You have to admit, having the assurance of eternal salvation, even if you are a soldier who has killed people in war, certainly beats being born to die, only to find out that the rest of eternity is to be spent within the limitations of what you experienced here, and then be forever rankling with embitterment because you thought you were clever when you rejected your salvation.
While it may not have been a sin for Israelites to go to war as a nation that was required to eradicate evildoers under the guidance of God. It is a sin for Christians to go to war and kill people. However, it is not a sin for Christians to equip themselves for spiritual warfare and go to war to save people from eternal damnation. For this is the will of God that all come to salvation and the knowledge of the truth.
Spiritual Warfare Begins With Basic Training And Those Best Equipped Survive