21 “Not everyone who says to Me, ‘Lord, Lord,’ shall enter the kingdom of heaven, but he who does the will of My Father in heaven. 22 Many will say to Me in that day, ‘Lord, Lord, have we not prophesied in Your name, cast out demons in Your name, and done many wonders in Your name?’ 23 And then I will declare to them, ‘I never knew you; depart from Me, you who practice lawlessness!’
Those people thought they knew God and were doing God's will
And they were wrong!
So they were religious people, likely moral people.
But they had no true relationship with Jesus, the way, truth and the life.
They were not His people, they were empty professors, they did not have the Spirit, they were carnal, and carnally minded men do not know God and have no peace with God through Christ. They walked according to their flesh and were not led by the Spirit.
Those who are led by the Spirit they are the sons of God. They led themselves, according to the flesh, being carnal and did not please God.
Romans 8
There is therefore now no condemnation to those who are in Christ Jesus, who[
a] do not walk according to the flesh, but according to the Spirit. 2 For the law of the Spirit of life in Christ Jesus has made me free from the law of sin and death. 3 For what the law could not do in that it was weak through the flesh, God
did by sending His own Son in the likeness of sinful flesh, on account of sin: He condemned sin in the flesh, 4 that the righteous requirement of the law might be fulfilled in us who do not walk according to the flesh but according to the Spirit. 5 For those who live according to the flesh set their minds on the things of the flesh, but those
who live according to the Spirit, the things of the Spirit. 6 For to be [
b]carnally minded
is death, but to be spiritually minded
is life and peace. 7 Because the [
c]carnal mind
is enmity against God; for it is not subject to the law of God, nor indeed can be. 8 So then, those who are in the flesh cannot please God.
9 But you are not in the flesh but in the Spirit, if indeed the Spirit of God dwells in you. Now if anyone does not have the Spirit of Christ, he is not His. 10 And if Christ
is in you, the body
is dead because of sin, but the Spirit
is life because of righteousness. 11 But if the Spirit of Him who raised Jesus from the dead dwells in you, He who raised Christ from the dead will also give life to your mortal bodies [
d]through His Spirit who dwells in you.
Sonship Through the Spirit
12 Therefore, brethren, we are debtors—not to the flesh, to live according to the flesh. 13 For if you live according to the flesh you will die; but if by the Spirit you put to death the deeds of the body, you will live. 14 For as many as are led by the Spirit of God, these are sons of God. 15 For you did not receive the spirit of bondage again to fear, but you received the Spirit of adoption by whom we cry out, “Abba,[
e] Father.” 16 The Spirit Himself bears witness with our spirit that we are children of God, 17 and if children, then heirs—heirs of God and joint heirs with Christ, if indeed we suffer with
Him, that we may also be glorified together.