Some religions were founded on the principle of being a pacifist. If those believers choose to incorporate that into their faith system, that is their choice. Usually the commandment that says thou shalt not kill is cited.
Forty after Moses brought down the 10 Commandments from the mountain, the Israelites crossed the Jordan and engaged in battle. The result of those battles caused many people to die. So how do we incorporate the idea of not killing and then the Israelites killed under the direction of God?
As in many cases of confusion regarding the Bible, is best to go back to the original language. The word kill in the 10 Commandments is not a universal under any circumstances word. The concept is that of murder, particularly premeditated murder.
This makes a world of difference in understanding when it is and is not okay to kill. Certainly, in self-defense that is a given if necessary, to kill.
By understanding the original Hebrew word, there is no conflict to decipher. If it is necessary to go to war and kill, that is not breaking the 10 Commandments. If killing is done as an act of murder, that is breaking the 10 Commandments.