“…by sending his own Son in the likeness of sinful flesh, and to deal with sin, he condemned sin in the flesh” Romans 8:3
“Here is a point that must be noted most carefully. Paul does not say that God punished Jesus. He declares that God punished Sin in the flesh of Jesus. Now, to be sure, the crucifixion was no less terrible an event because, with theological hindsight, the apostle could see that what was being punished was Sin itself rather than Jesus himself. The physical, mental, and spiritual agony that Jesus went through on that terrible day was not alleviated in any way. But theologically speaking—and with regard to the implications that run through many aspects of church life, teaching, and practice—it makes all the difference.
The death of Jesus, seen in this light, is certainly penal. It has to do with the punishment on Sin—not, to say it again, on Jesus—but it is punishment nonetheless. Equally, it is certainly substitutionary: God condemned Sin (in the flesh of the Messiah), and therefore sinners who are ‘in the Messiah’ are not condemned. The one dies, and the many do not. All those narrative fragments we saw in Luke and John come into their own.”
N. T. Wright, The Day the Revolution Began