Did Jesus take the punishment for humanity's sins when he died on the cross? That idea is called penal substitution and is summed up by Reverend Rod Thomas, from the evangelical group Reform, as "When God punished he showed his justice by punishing sin but he showed his love by taking that punishment himself".
We believe that Jesus Christ was God incarnate. We also believe that Jesus Christ died on the cross. If we say that God died on the cross, and if by that we mean that the divine nature perished, we have stepped over the edge into serious heresy. In fact, two such heresies related to this problem arose in the early centuries of the church: theopassianism and patripassianism. The first of these, theopassianism, teaches that God Himself suffered death on the cross. Patripassianism indicates that the Father suffered vicariously through the suffering of His Son. Both of these heresies were roundly rejected by the church for the very reason that they categorically deny the very character and nature of God, including His immutability. There is no change in the substantive nature or character of God at any time.