This is simply false.
Moral justification of punishment is not vengeance, but desert. Vengeance signifies inflicting harm on the offender out of anger because of what he has done. Retribution is the rationally supported theory that the criminal deserves a punishment fitting to the gravity of his crime.