Regarding the part I highlighted, there were times in the Bible where God did indeed appear to ask some to kill others of a tribe, unbelievers, those trying to lead the ones in his chosen tribe astray, etc. You can't say that "God wouldn't do that" when he did things quite like that in the Old Testament, unless it wasn't God who told the Israelites to go and kill everyone "man and woman, infant and suckling" (forget the exact wording but something like that), and killing everyone but the virgins in Numbers 31, or "killing brother and neighbor" in Exodus 32:26-28 (though in that case Moses said that God said that so it may not be as applicable), or stoning someone who just gathered wood on the Sabbath (Numbers 15:32-25) They all are terrible things but they were apparently okay because God commanded it, so we can't just say "Oh, God would never do that" when apparently he did, unless they really weren't hearing God at all.
I do agree about you last paragraph though, since killing someone in self-defense is protecting your own life against violence.
And I figured this would come up, sooner or later in the question. But I didn't realize that was your purpose in asking.
I can't tell you THE answer.
What I do know is that Christ is God revealed to us. So in this day, we have an advantage that ancient Israel did not possess. God walked among us, taught directly in detail for years, and gave us His answer to many dilemmas.
I almost wish someone had asked Him that question (maybe they did) but I also wish the answer had been written into the canon for us.
I don't know.
Would Christ have made that command? I'm borderline skeptical, because on the surface it doesn't sound like Him. So maybe there was a little problem of human interpretation finding its way in to what we read today. I don't actually think that's the case though, but for all I know, it could be.
Or maybe it was a lesser of two evils? I know it sounds brutal, it does to me also. But we are talking about the establishment of the line through which Christ became Incarnate, and through Him, all men have the opportunity to be saved. If for some reason it was NECESSARY, then it might have been the only choice. And further, we read of Christ preaching while in the tomb ... in the end, how do we know those persons don't all end up "saved"? I know some more recent denominations might disagree with this possibility, but I don't agree with limiting God or His mercy.
And if we understand the temporal vs. the eternal, those lives were cut short by some years on earth, but how does that compare to an eternity of true life?
If those persons are redeemed in the end, or any of them who are, if you ask them in the age to come if they had rather lived out natural lives only to be kept eternally under a curse of death, or if they would rather have died sooner but experienced resurrection and eternal life, I'm willing to believe they would happily choose the outcome God apparently commanded as well.
We don't see through the eyes of eternity, or into hearts. I understand your question, but if I step back and try to see it truly objectively in an eternal sense, it begins to seem much more "less evil" than the alternative.