"If anyone is in Christ, he is a new creation. The old has passed away; behold, the new has come. All this is from God, who through Christ reconciled us to himself and gave us the ministry of reconciliation... For our sake he made him to be sin who knew no sin, so that in him we might become the righteousness of God."
"For the love of Christ controls us, because we have concluded this; that one has died for all, therefore all have died. And he died for all, that those who live might no longer live for themselves but for him who for their sake died and was raised."
Jesus became sin itself on the cross. Someone equal to the law had to satisfy its claims. Jesus kept the law, there was no sin in him. Therefore he could fulfill the law for us who cannot keep the law. His goodness becomes ours when we accept his sacrifice.
I don't really understand how Jesus became sin or how he felt on the cross. I have read that he felt eternally lost as he hung there; that he felt what a lost person feels at the judgement and this is why he cried out, "My God, my God, why have you forsaken me?" He must have felt he would never see Heaven or his Father again.
I thank Jesus, God and the Holy Spirit for going through all this for me.