Forgiveness of sin alone does not make a person righteous. It only removes the guilt from the sin. The Law/justification requires a positive record of perfect obedience. The Law was given for the purpose of showing that it's impossible for us to not sin. The standards of righteousness that we are judges by are God Himself. The Law is a reflection of His holy character. He's flawless. Perfectly righteous and perfectly sinless. That's the standard that He must judge us by without compromising who He is. If He gives one sin a pass without that sin facing His justice, then He would no longer be just, then He also would no longer holy, then He also would no longer righteous. It all falls down and collapses. I said it before, God is constrained by His attributes. He cannot tell a lie, He cannot sin, He is just, not 'just' in a nice happy way, but just in a legal way, perfectly holy justice. That's why Jesus had to do it for us. We can't do it. It's impossible for us (the purpose of the Law is to show us that it's impossible for us). Jesus did it for us. What is impossible for man is possible for God. As a man, Jesus was perfect in His obedience, perfect in His righteousness, that's the righteousness of God that is imputed to us and legally justifies us. His perfect sinlessness made Him an acceptable sacrifice for us to atone for our sin. We cannot even atone for our own sin because we are blemished. Jesus does not fill in the blanks, He's the whole offering on our behalf. All Jesus, none of ourselves, that's the only way the offering passes God's perfect, holy and righteous standards, the Law. Knowing this, listen to Paul....
Romans 3:19-31 Now we know that whatever the law says, it says to those who are under the law, that every mouth may be stopped, and all the world may become guilty before God.
Therefore by the deeds of the law no flesh will be justified in His sight, for by the law is the knowledge of sin.
But now the righteousness of God apart from the law is revealed, being witnessed by the Law and the Prophets,
even the righteousness of God, through faith in Jesus Christ, to all and on all who believe. For there is no difference;
for all have sinned and fall short of the glory of God,
being justified freely by His grace through the redemption that is in Christ Jesus,
whom God set forth as a propitiation by His blood, through faith, to demonstrate His righteousness, because in His forbearance God had passed over the sins that were previously committed,
to demonstrate at the present time His righteousness, that He might be just and the justifier of the one who has faith in Jesus.
Where is boasting then? It is excluded. By what law? Of works? No, but by the law of faith.
Therefore we conclude that a man is justified by faith apart from the deeds of the law.
Or is He the God of the Jews only? Is He not also the God of the Gentiles? Yes, of the Gentiles also,
since there is one God who will justify the circumcised by faith and the uncircumcised through faith.
Do we then make void the law through faith? Certainly not! On the contrary, we establish the law.
Galatians 3:10-29 For as many as are of the works of the law are under the curse; for it is written, "Cursed is everyone who does not continue in all things which are written in the book of the law, to do them."
But that no one is justified by the law in the sight of God is evident, for "the just shall live by faith."
Yet the law is not of faith, but "the man who does them shall live by them."
Christ has redeemed us from the curse of the law, having become a curse for us (for it is written, "Cursed is everyone who hangs on a tree"),
that the blessing of Abraham might come upon the Gentiles in Christ Jesus, that we might receive the promise of the Spirit through faith.
Brethren, I speak in the manner of men: Though it is only a man's covenant, yet if it is confirmed, no one annuls or adds to it.
Now to Abraham and his Seed were the promises made. He does not say, "And to seeds," as of many, but as of one, "And to your Seed," who is Christ.
And this I say, that the law, which was four hundred and thirty years later, cannot annul the covenant that was confirmed before by God in Christ, that it should make the promise of no effect.
For if the inheritance is of the law, it is no longer of promise; but God gave it to Abraham by promise.
What purpose then does the law serve? It was added because of transgressions, till the Seed should come to whom the promise was made; and it was appointed through angels by the hand of a mediator.
Now a mediator does not mediate for one only, but God is one.
Is the law then against the promises of God? Certainly not! For if there had been a law given which could have given life, truly righteousness would have been by the law.
But the Scripture has confined all under sin, that the promise by faith in Jesus Christ might be given to those who believe.
But before faith came, we were kept under guard by the law, kept for the faith which would afterward be revealed.
Therefore the law was our tutor to bring us to Christ, that we might be justified by faith.
But after faith has come, we are no longer under a tutor.
For you are all sons of God through faith in Christ Jesus.
For as many of you as were baptized into Christ have put on Christ.
There is neither Jew nor Greek, there is neither slave nor free, there is neither male nor female; for you are all one in Christ Jesus.
And if you are Christ's, then you are Abraham's seed, and heirs according to the promise.
Thankyou Jesus
Romans 10:1-13 Brethren, my heart's desire and prayer to God for Israel is that they may be saved.
For I bear them witness that they have a zeal for God, but not according to knowledge.
For they being ignorant of God's righteousness, and seeking to establish their own righteousness, have not submitted to the righteousness of God.
For Christ is the end of the law for righteousness to everyone who believes.
For Moses writes about the righteousness which is of the law, "The man who does those things shall live by them."
But the righteousness of faith speaks in this way, "Do not say in your heart, 'Who will ascend into heaven?' " (that is, to bring Christ down from above)
or, " 'Who will descend into the abyss?' " (that is, to bring Christ up from the dead).
But what does it say? "The word is near you, in your mouth and in your heart" (that is, the word of faith which we preach):
that if you confess with your mouth the Lord Jesus and believe in your heart that God has raised Him from the dead, you will be saved.
For with the heart one believes unto righteousness, and with the mouth confession is made unto salvation.
For the Scripture says, "Whoever believes on Him will not be put to shame."
For there is no distinction between Jew and Greek, for the same Lord over all is rich to all who call upon Him.
For "whoever calls on the name of the Lord shall be saved."