Jesus told that to the rich young ruler, who was still under the Old Law. There is a new covenant in place, and with the new covenant there are new obligations for one who wishes to become a child of God.
***There is a new covenant in place, and with the new covenant there are new obligations for one who wishes to become a child of God.***
Mat 11:12 And from the days of John the Baptist until now the kingdom of heaven suffereth violence, and the violent take it by force.
Mat 11:13 For all the prophets and the law prophesied until John.
Luk 16:16 The law and the prophets [were] until John: since that time the KINGDOM OF GOD is preached, and every man presseth into it.