What you’re talking about is the doctrine of
penal substitutionary atonement. This is a standard evangelical theological position
defined by evangelical Anglican theologian J. I. Packer as:
God remits our sins and accepts our persons into favour not because of any amends we have attempted, but because the penalty which was our due was diverted on to Christ. The notion which the phrase ‘penal substitution’ expresses is that Jesus Christ our Lord, moved by a love that was determined to do everything necessary to save us, endured and exhausted the destructive divine judgment for which we were otherwise inescapably destined, and so won us forgiveness, adoption and glory. To affirm penal substitution is to say that believers are in debt to Christ specifically for this, and that this is the mainspring of all their joy, peace and praise both now and for eternity.
Brandon Smith, writing for The Gospel Coalition, explains it this way:
As he hung on the cross, Jesus cried out the epic, mysterious words, “My God, my God, why have you forsaken me?” (Matt. 27:46). What did He mean by this? How could the eternal Son be in any way separated from the eternal Father? Why does it matter?
These questions have perplexed Christians for centuries, but the answer is crucial: the sinless Jesus had God’s wrath toward our sins thrust upon His dying shoulders, temporarily separating Him from the eternal affection and protection of His own Father. He was abandoned in order to experience and absorb God’s anger.
This is called penal substitution: Jesus was punished (penalized) in our place (substitution) so that we could be forgiven.
Sin is so offensive to God that only the blood of a spotless sacrifice will wipe it clean (Isa. 53:5-6; Rom. 3:25; Heb. 10:11-12). So in the greatest mission trip of all time, God the Son entered human history to die a gruesome death to “become a curse for us” (Gal 3:13), even though he was anything but a curse, because we deserve wrath for the sins we commit (Rom. 1:18, 6:23; Eph. 2:3). Jesus Himself said that He came to give His life as “a ransom for many” (Matt. 20:28). Paul echoed this, saying that Jesus came “to be sin for us” (2 Cor. 5:21). Jesus paid it all on the cross, once and for all (Heb. 10:12). Because of this, when God looks at us, he no longer sees a sinner destined for wrath; he sees His Son nailed to the cross, shedding His own blood in our place. He died so that we may truly live, free from the shackles of sin and death.
Because “all have sinned”, God’s justice demanded that all people receive the punishment for sin–death. Jesus, as both God and man was without sin and was uniquely qualified to become our substitute. God imputed our sin to Jesus, and imputed the righteousness of Jesus to us. This is the basis of our salvation. When God looks at us, he does not see our sin (which was washed away in the blood of Christ), but he sees only the righteousness of Christ and declares us righteous.
Most, but not all, evangelical Protestants subscribe to the penal substitution theory. There are some Wesleyan-Arminians who don’t, preferring what’s called the “governmental theory of the atonement.”
Jesus did freely lay down his life. He was not forced to do anything, but did it willingly out of love. However, according to the penal substitution view, Jesus did
voluntarily take our punishment on himself. God the Father satisfied his justice by punishing Jesus instead of you and me. In return, we get to be forgiven and become restored to divine fellowship through the death and resurrection of Jesus Christ.
Here are some verses often used as support:
“God made him who had no sin to be sin for us, so that in him we might become the righteousness of God” (2 Corinthians 5:21).
“Christ redeemed us from the curse of the law by becoming a curse for us, for it is written: ‘Cursed is everyone who is hung on a tree’” (Galations 3:13).
“God presented [Jesus] as a sacrifice of atonement, through faith in his blood. He did this to demonstrate his justice, because in his forbearance he had left the sins committed beforehand unpunished—he did it to demonstrate his justice at the present time, so as to be just and the one who justifies those who have faith in Jesus” (Romans 3:25-26).
'We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all" (Isaiah 53:6).