Matthew 7:21 “Not every one that saith unto me, Lord, Lord, shall enter into the kingdom of heaven; but he that doeth the will of my Father which is in heaven.” Matthew 7:22 “Many will say to me in that day, Lord, Lord, have we not prophesied in thy name and in thy name have cast out devils? And in thy name done many wonderful works?”
In these verses, the Bible is stating that not every one will enter into heaven. Even if someone calls Jesus Lord, and in verse 22 Jesus even states that those who say they prophesied in His name and even cast out devils or even have done many wonderful works. Just because these people have claimed these things does not give them the credentials to enter into heaven.
In these verses, Jesus tells who can enter into heaven. Look again at verse 21. He that dose the will of God, which is in heaven, can enter into heaven.
Let's look at the will of God. These people describe doing the will of God; prophesying, casting out devils, good works. The Bible only mentions one will of God that entitles a person to enter inter into heaven. John 3:3 “Jesus answered and said unto him, Verily, verily, I say unto thee, Except a man be born again, he cannot see the kingdom of God.” Those that are born again, that have asked Jesus into their hearts. These are the ones that can enter into heaven.