If you are referring to John 3:16, The world in this verse has to be "the world of believers"
Heb 12:6, For whom the Lord loveth he chasteneth, and scourgeth every son whom he receiveth. You have been taught, I presume, that God loves all mankind, and wants to save all mankind to eternal heaven, and this is the loving God that you want to serve, but the truth is that if he loved everyone, then he would chasten everyone.
Psalms 73, David was envious of the wicked because he saw the prosperity of the wicked, saying that there are no bands in their death; but their strength is firm. They are not in trouble as other men; neither are they "PLAGUED" (Greek=divinely punished) as other men.
verse 13, Verily I have cleansed my heart in vain, and washed my hands in innocency. 14, For all the day long have I been plagued, and chastened every morning.
God does not love all of mankind, and Jesus did not die for all mankind. Had he died for all mankind, then all mankind will be in heaven.