Paul said, "There is none righteous, no, not one" Romans 3:10.
If sinful man is to be saved his salvation must come to him totally and completely outside of himself. Thank God that it has in the person of Jesus Christ.
Jesus is God's new Adam and our new humanity.
"Therefore if ANY MAN be in Christ he is a new creation: old things have passed away; behold all things are become new" 2 Corinthians 5:17.
Jesus in our name and on our behalf fulfills God's holy law, Matthew 5:18, and then abolishes it, Ephesians 2:15. Where there is no law there is no judgment.
"There is no condemnation to them that are in Christ Jesus" Romans 8:1.
The fulfilling and abolishing of God's law was not enough, something had to be done about our sins. Jesus in our name and on our behalf became sin for us.
"For he has made him to be sin for us, who knew no sin; that we might be made the righteousness of God in him" 2 Corinthians 5:21
We are made righteous by the doing and the dying of Jesus. In the judgment God will see all that have faith in Jesus as perfect and complete in him, Colossians 2:10.