You definitely want to read about what “just war” means in the context of Christianity and of Catholic doctrine (which contains, as you know, the fullness of the teaching). The topic is quite delicate.
Ultimately it is not up to soldiers to judge whether a war is just or unjust. Soldiers are bound by obedience to their superiors. The top levels of the military hierarchy and the government decision-makers know the reasons for which they send their and our offspring to risk and sacrifice their lives, and their knowledge of the facts trascends what any average citizen or soldier could ever possibly grasp. It is a common “average person’s” way of speech to criticize unjust wars etc. and come up with all sorts of anti-government anti-military nonsense, when in fact they know nothing or less than nothing about what moves a nation to send their troops abroad. Only when a millenary enemy strikes our backyard we perhaps thank God that we have men ready to die for the sake of our families, of our wife and kids.
We need in fact more repentance for judging them, than they need for taking the decisions required by their state of life.
As others have said, there are specific parts of war that have been criticized by members of the Church, and many things that could, can, and should be done better. But war is not intrinsically evil - it so happens that often times evil happens where there is violence and death, more than anyone would want it to happen.