Here is a good synopsis of the first 21 verses of John chapter 3:
Christ was visited by a man named Nicodemus, a teacher and a ruler of the Jews. The man was looking for affirmation of his faith and more evidence Christ had come from God. Jesus told him he must be born again.
The man wrestled with this and Christ explained just as a man has no control over his first birth, so too, only God has control over his second birth. Like the wind, we cannot see the working of the Spirit but we can see the evidence of His work wherever He goes.
Then Christ went on to overcome some of the Jews’ false beliefs, namely the Messiah did not come to save the Jews exclusively but He came to save the world. Based Upon what He just said about being born again, we can assume He is talking about the elect, worldwide. Also, the Jews believed Christ would come to judge the nations and exalt Israel but He laid that to rest and explained the only way to escape judgment is to believe in the only Son of God. Those who do not believe in the name of the only Son of God are condemned already – then and there, Jew or Gentile.
Finally, Christ said the wicked hate the light and will not come to it, while those who cling to the light are revealed that the good works they do have been carried out by God. He is reinforcing the doctrine that God is in control of who will be saved and the doctrine man is not saved by his good works but the saved will do good works because God is working through them.
So, when you say Christ did not come to condemn people, to be your interpretation of verse 3:17, you miss what He said in the next two verses; those who do not believe are condemned already. The meaning of Christ not coming to condemn the world was that He did not come to judge the nations and exalt Israel, as had been the Jews’ expectation of the Messiah. He does make it clear, He and the Father do judge now and at the judgment, several more times in the Book of John.
When you say God loved the whole world and Christ came to save the whole world to be your interpretation of verse 3:16, you miss what He just told Nicodemus; man cannot turn to God, it is God who is in control and the Spirit is like the wind – we do not see where He goes but we can see where He has been. Christ told us in John 6:44 no one comes to Him except the Father draws him. And, then there are the verses in Scripture that tell us of those whom God hates; and Christ’s claim He has blinded His hearers lest they believe (Joh 12:40) and His rebuke to others they cannot believe. Jesus said none who belong to Him can be lost from His or His Father’s hand (Joh 6:39; 10:28-29). So, clearly, John 3:16 is talking about those in the whole world who belong to Christ – not just those in Israel. What He said to Nicodemus was not a claim that God loves everyone in the world but a refutation against the view the Messiah was coming to save Israel alone. In fact, He warns it is not enough to be Jew because if you do not believe, you are condemned already.
It is important to understand these two verses in context. For those who want to argue God is not willing that any should perish – as if Peter is talking about everyone in the world, you need to read this in context as well.