The fact that the man comes with this question specifically to Jesus shows that he sees Jesus as the person who knows the answer he needs. Apparently he has heard about the preaching of John the Baptist and Jesus (the kingdom of heaven that they announce is eternal life) and he has also understood that one does not “merit,” but inherits this kingdom and this life (by grace, from God). He wants to enter this kingdom and receive this life with Jesus. He knows that Jesus is the Teacher who leads people there.1
17 And as he was setting out on his journey, a man ran up and knelt before him and asked him, “Good Teacher, what must I do to inherit eternal life?”