Jesus died to cleanse us from all unrighteousness. Through confession of sin and rebirth by the Holy Spirit, we are given the gift of unmerited favor and given the righteousness of God so that all our sins are washed away and in God’s eyes, it is as though we have never committed any sin. Jesus took the blame as if he had committed our sins and not us.
Having become sin for us, Jesus has made us the righteousness of God because God who is Holy now lives in the heart of every believer. His Spirit is perfect and he dwells in us.