We are all sinners. We want to justify ourselves, but the truth is that we are all separated from God's righteous Spirit, until we are connected and reconciled to Him. Romans 8:9 says that if we don't have His Spirit, then we do not belong to Him, we are none of His.
God is the Source of Goodness, Truth, Love, Life, and Righteousness. The flesh (our natural self) is at enmity against God, and cannot please Him. What pleases the Lord is receiving His Righteous Spirit. If we see ourselves as righteous, we will not be justified in the eyes of God. But if we are honest and humble ourselves, knowing we are sinners in need of our Savior, God will grant us salvation. To any person who calls upon His name, in sincerity and in truth with a humble heart - God will acknowledge and give to that person Eternal Life. And His Spirit attached to our Spirit is our connection to Eternal Life.
The Spirit which now dwells within those who have become saved are given discernment to know what is of God's Spirit and what is not, discerning righteousness from unrighteousness. These new desires are the result of God impressing His own desires upon our souls. If you desire the Righteousness which comes from God, He will give to you His Spirit. To be righteous is to be whole or complete in one's goodness, it is purity -- and none of us are pure, except for God. What we call goodness, has failure -- but God's goodness never has any lacking. Good never fails to be what it is, it doesn't have to try to be what it already is. When we receive God's Spirit, He empowers us to live righteously - not according to our own standards or the ever-changing values of the world -- but according to His Spirit, which is true righteousness.