And the gospel teaches us that that punishment occurred in our crucifixion with Jesus Christ. Sin does deserve judgment. The guilty person must be judged. God is not unrighteous. And that is why Jesus Christ had to suffer on the cross.
Sin deserves punishment.
And in John chapter 12, when Jesus said, now is the judgment of this world, and then said, If I be lifted up from the earth, will draw all men unto me, he was telling us that the judgment of all men would be fulfilled and taken care of in his death on the cross. In that manner, your guilt would be judged. The guilt of the people drawn into him would be taken care of. When you were baptized into Jesus Christ you were baptized in his death. Jesus was actually referring to baptism here, because being drawn into him in into his death is accomplished by water baptism according to Paul.