Justice means getting what you deserve.
This is a traditional definition, which I believe is true.
Jonathan Haidt, in The Righteous Mind, notes that "fairness" is a basic moral value, to which we have a strong emotional attachment. However, Haidt found an interesting ideological difference in what fairness means.
To liberals, fairness means that you get an equal share.
To conservatives, fairness means that you get a share proportionate to what you put in.
However, neither view of fairness is based on getting the share you deserve.
Knowing what you truly deserve is a very deep and hard question. Ultimately, I think, only God can know that. The best human approximation is how parents try to give their children what they should have, what would be most beneficial to their lives and development. But, as all parents know, this approximation is uncertain, and we are prone to mess it up in practice.
So we use fairness as a rough proxy for justice. But our different ideological views of what fairness entails has very difference consequences for the kinds of society we are trying to make.