Low behold, one came and said to Him, Good Teacher, what good thing shall I do that I may have eternal life?
So He said to him, Why do you call Me good? No one is good but One, that is, God. But if you want to enter into life, keep the commandments.
The 10 commandments were in-force while Jesus lived on the Earth. The were done away with when he died on the cross.
Ummm misquote of scripture to start with ... ..but the youth said he had kept all the commandments and Christ still sent him away ..
One very important thing to remember when reading the gospels is they are retrospective ...they reflect the Old Testament laws that Jesus lived under and kept perfectly for the saved ...
[NASB version]
"Do we then nullify the Law through faith? May it never be! On the contrary, we establish the Law."
___
[KJV]
"Do we then make void the law through faith? God forbid: yea, we establish the law."
___
[CJB, Complete Jewish Bible]
"Does it follow that we abolish Torah by this trusting? Heaven forbid! On the contrary, we confirm Torah."