And, behold, one came and said unto him, Good Master, what good thing shall I do, that I may have eternal life?
Note 1 at Mt 19:16: On the surface, it appears that this rich young ruler was "dead on" in the way he approached Jesus and sought salvation. He ran, kneeled down to Jesus, and openly professed Him as a Good Master. What could be wrong with that?
First, he acknowledged Jesus as good but not as God. This is a pivotal point. Every major religion of the world acknowledges that Jesus lived and will even admit that He definitely was a good man, but they won't recognize Him as God. If Jesus was only a good man, He couldn't save anybody. Jesus didn't just come to show us the way to God. He is the way, the only way unto the Father. No man can come unto the Father, but by Him (Joh 14:6). Jesus had made this point publicly many times before (see note 3 at Joh 5:18, note 8 at Joh 5:23, and note 23 at Joh 8:58).
This was the reason that Jesus responded to this young man's question the way He did. Jesus was saying, "God is the only one who is good. You must accept Me as God or not at all." Jesus was either whom He claimed to be (i.e., God - see note 8 at Joh 5:23, note 23 at Joh 8:58, note 2 at Lu 10:18, and note 3 at Joh 10:30) or He was the biggest fraud that ever lived. He had to be one or the other. He couldn't be both.
Second, he asked what he could do to produce salvation. He trusted in himself and believed he could accomplish whatever good work Jesus might request. This was completely opposed to the plan of salvation that Jesus came to bring. Jesus obtained salvation for us through His substitution, and He offers it to us as a free gift. All we can do is believe and receive. This rich young ruler wasn't looking for a Savior. He was trying to be his own savior. This was the reason Jesus referred him back to the commandments (see note 2 at Mt 19:17).