Nicodemus would probably be welcome at any church today. He seems like an ideal member-principled, knowledgeable, morally upstanding, courteous, and humble. However, Nicodemus had two big problems despite all of that outward religious appeal: first, he was blind to the truth, and second, he was spiritually dead.
The man was lost. That is, he did not have a relationship with God through Jesus Christ. As a Pharisee, Nicodemus adhered to strict Jewish codes and laws, so he was certainly religious. But the problem of the lost person is not attitudes, conduct, or even character. We can change and control those things through sheer determination, and many folks do. What people really need is a change of their basic nature. We come into this world with a natural "bent" away from God.
Jesus explained to the observant rabbi that all his outward goodness couldn't erase, replace, or change his nature. Instead, every person who desires to serve God must be born again. The Lord promised that if Nicodemus received Him as Savior, then he would enter into a brand-new life. His old sinful nature would be transformed so that he could have a real relationship with God. Instead of appearing to be a religious man, Nicodemus would be a true believer.
No one gets into heaven on the strength of good works and kind behavior. When we stand before God, the only thing that will matter is whether our old sin nature has been replaced. We want to show Him the living Spirit we received when Jesus came into our life.