The 'Just War Theory' as a philiosophy appears to provide a solution. However, can you name me one war in which the ideals of the 'just war theory' were implemented infalibly? Let me answer this for you; the answer is no.
Nations do not have the charism of infallibility, so you are correct that no war was ever infallibly just. However, I would argue that the response to Nazi, Facist and Imperial agression in World War II came mighty close. That does not mean that every action taken by the Allies in that war was necessarily just, but I do believe the overall need for response qualifies for a "Just War."
How can you love your neighbour by killing him? How can you turn the other cheek? How can killing uphold the message of the Gospel?
The very concept of Just War recognizes that sometimes governments are required to intervene to save those who are being unjustly killed. The genocide of the Jews during World War II, and the genocides in Africa, are prime examples of situations in which governments need to intervene to protect the innocent, just as you or I would intervene to protect our families from attack.
Mind you, governments do not a spotless record. Many wars have been fought unjustly, and many necessary actions have not been taken simply because it was not "convenient" or the selfish interests of the more powerful nations have not indicated that intervention was a priority, so we have "looked the other way" too many times. That's not the same thing as turning the other cheek; we can only do that when we ourselves have been slapped. But Jesus never said we should not defend ourselves from repeated attacks, or defend the less fortunate when they need our assistance.
Protecting the helpless is indeed part of the Gospel of Charity.