Jesus is our sure foundation, not the Law of Moses.
Isaiah 28:16
therefore thus saith the Lord God, Behold, I lay in Zion for a foundation a stone, a tried stone, a precious corner stone, a sure foundation: he that believeth shall not make haste.
1 Peter 2
3 if so be ye have tasted that the Lord is gracious. 4 To whom coming, as unto a living stone, disallowed indeed of men, but chosen of God, and precious, 5 ye also, as lively stones, are built up a spiritual house, an holy priesthood, to offer up spiritual sacrifices, acceptable to God by Jesus Christ. 6 Wherefore also it is contained in the scripture, Behold, I lay in Sion a chief corner stone, elect, precious: and he that believeth on him shall not be confounded. 7 Unto you therefore which believe he is precious: but unto them which be disobedient, the stone which the builders disallowed, the same is made the head of the corner, 8 and a stone of stumbling, and a rock of offence, even to them which stumble at the word, being disobedient: whereunto also they were appointed. 9 But ye are a chosen generation, a royal priesthood, an holy nation, a peculiar people; that ye should shew forth the praises of him who hath called you out of darkness into his marvellous light: 10 which in time past were not a people, but are now the people of God: which had not obtained mercy, but now have obtained mercy.
Eph 2
19 Now therefore ye are no more strangers and foreigners, but fellowcitizens with the saints, and of the household of God; 20 and are built upon the foundation of the apostles and prophets, Jesus Christ himself being the chief corner stone; 21 in whom all the building fitly framed together groweth unto an holy temple in the Lord: 22 in whom ye also are builded together for an habitation of God through the Spirit.
Keeping the Law does not keep us close to God. Jesus in us keeps us close to the Lord. He has made His home in us.