The bible only ever forbade murder. God has always been OK with killing in self defense, war, etc. Additionally, the covenant commands capital punishment for a number of crimes.
One of the main benefits of being God's chosen people was that he would bless the Jews with victory in war. God promises to help the Jewish people against their enemies (with natural disasters, insect plagues, etc) but also warns that he won't do all the work. They have to pick up swords and get busy if they want his favor. God was a lot more active back in the day.
God is actually quite fond of killing in certain situations. For their transgressions during (I think) Exodus, God ordered the Jews to wipe out the Amalekites entirely and punished certain of the Jewish kings when they failed to prosecute the war with sufficient zeal.
In more modern times, the Catholic Church has repeatedly said that using deadly force in self defense is fine because your life is a precious gift and declining to defend it is an insult to God. I am really unsure of my memory of this, and the reasoning might have been different. I am 100 percent sure the catholic church recently said deadly force in self defense is A-OK.
Jesus said to turn the other cheek, but he was also taking up arms against the Romans, so I'm not sure I would take the forgiveness angle to an absurd place. I think Jesus would probably want us to defend ourselves and forgive later.
I am not a theologian obviously, errors surely abound.