He did his best and he genuinely believed that he had succeeded. He believed he was a good person worthy of eternal life. This rich young ruler must have been an impressive individual. The problem is that he really didn't have a biblical perspective of sin. Erickson lists 5 perspectives on sin that he sees in the Bible.
Sin is an inward inclination.
Sin is not merely wrong acts, but sinfulness as well. It is an inherent inner disposition inclining us to wrong acts. Sin is rebelliousness and disobedience. Sin entails spiritual disability. It alters our inner condition, our character.