2Cor 5:21 For He made Him who knew no sin to be sin for us, that we might become the righteousness of God in Him
This verse has been used by some to indicate that Jesus became a sinner. That is totally untrue. We have to think of the word “impute” to get a better understanding of the verse. To “impute” is to represent, ascribe or attribute something to someone other than yourself which explains this verse.
God treated Jesus as though He lived our lives of sin and treated us as though we lived His life of righteous perfection. The moment we place our faith in Christ, God ascribes the perfect righteousness of Christ to our account and thereby “…be found in Him, not having my own righteousness, which is from the law, but that which is through faith in Christ, the righteousness which is from God by faith;” (Phi 3:7-9). This how we become perfect (positionally) in His sight. We are clothed in His righteousness. This righteousness is imputed then implanted.