He died as a substitute for his people on the cross. “He himself bore our sins in his body on the tree, so that we might die to sin and live for righteousness.” (1 Peter 2:4)
“He forgave us all our sins, having canceled the written code, with its regulations, that was against us; he took it away, nailing it to the cross.” (Colossians 2:13,14)