They made up a definition in 1945 (I know various forms of "war of aggression" were bandied about in the '30s, which amounted to nothing) to use at the trials. The only wrong war is a war that you lose...And Germany lost. That alone was enough for the allies to do what they wished to punish Germany. But it was nonsense to cook up a wishy-washy definition practically on the spot in order to lend a veneer of international legitimacy to the proceedings.
I disagree that the only wrong war is one you lose. I’m no expert, nor am I catholic, but I’m pretty sure the just war concept differentiates between a “good” war and a “bad” one.