The young man who spoke to Jesus was convinced he was "good". His adherence to the commandments was the definition of "good" in human eyes. Jesus is saying "No one this side of Heaven is good".
He could be saying that too, but it would have to exclude Himself. That would fit with the rest of the passage, where Jesus effectively shows the man his sin.
The disciples saw that the man was basically good by earthly standards having kept all those commandments. They were shocked when Jesus said "It's easier for a camel to go through the eye of a needle". They asked in response, who then can be saved?
Fortunately it doesn't depend on man, and with God all things are possible.