He did it WILLINGLY.
After all, Jehovah used him to CREATE us!
He chose to remove the death penalty.
That doesn't change the calculus at all. Even if the innocent man
volunteers to be punished in the guilty man's stead, it is unjust to accept the offer.
The idea that a just God would ever punish A for B’s sin―whether or not A volunteered for the substitution―is a troubling one. A
bloodthirsty God just might decide that “someone has to pay!” and accept such an offer. But a
just God―at least as we humans reckon justice―would never do so. It is central to our notions of justice that the guilty, not the innocent, are punished. The guilty may be forgiven as an exercise in mercy (mercy being in effect a suspension of justice),
but not at the expense of the innocent.
If I were convicted of capital murder, and you volunteered to go to the gallows for me, do you really think the judge would be acting with "justice" if he accepted your offer?