The word "world" in the Greek language means "an ordered system." Whenever Jesus used the word "world," He used His own language. But whatever word or words Jesus used for "world," God had them translated into the Greek word for "world."
As the part is, so is the whole. God creates every human in His image to be good and creative. Genesis 1:31; Genesis 1:26-27 (KJB). But whenever humans sin, the Devil plants spiritual death, which is evil, into their inner beings. Genesis 2:17; Genesis 3:15 (KJB). The same is true of the world. When God cast Satan out of Heaven, he established his own evil kingdom in the world. Luke 4:5-8; II Corinthians 4:4 (KJB). But the kingdom of God also exists in the world in the hearts of every human. Luke 17:20-21; John 10:34-35 (KJB). Thus, humans can choose to live good lives or evil lives. But all humans are also sinners which means that only God can save them from eternal death. Romans 3:23; Romans 6:23 (KJB). The kingdom of God and the kingdom of Satan coexist in this world.
Jesus taught that when He would hang on the cross, He would do so to judge the world and the Devil in order to cast out all evil from His world. John 12:31 (KJB). Jesus also taught that He would go to the cross to "draw all men unto me," meaning all of His living humans that He creates and loves. John 12:32 (KJB). Jesus did not contradict Himself when He taught that "I came not to judge the world, but to save the world. John 12:47 (KJB). Jesus clearly had different meanings for His use of the word "world" in these two different statements, and the context in which He said them clearly shows what meanings He used. When Jesus said that He would judge the world and the Devil, He clearly meant that He would "cast out" the Devil's kingdom from the world. John 12:31; I John 3:8 (KJB). When Jesus said He would not judge the world, but save the world, He clearly referred to His statement that He would "draw all men unto me," which means He would go to the cross to save every human that He ever created. John 12:47 (KJB). In this meaning of the word "world," it means the same as humanity. Christ will save the entire kingdom of God, and He will utterly and forever destroy the kingdom of Satan.
As Jesus draws all men unto Him, He will save by His grace all of His living humans who repent and believe in Him as their Savior while they are still alive in the flesh. John 5:24; John 3:3 (KJB). But Jesus also taught that He would reserve His judgment of all unbelievers until the end of the world. John 12:48 (KJB). He will judge them by His Word, and according to His Word, He came to save the world, meaning every living human He ever created. Christ will visit all unbelievers "on the earth, and under the earth" in the end of the world, and He will cause them all to repent and return to the faith that He put into them when He created them so that He can use His fiery wrath against evil to dissolve their beings to separate their repentant, good and living natures from their dead and evil natures so that He can save and recreate their good natures with new bodies to live forever on His recreated earth, and He will cast their dead and evil natures into the eternal lake of fire. Revelation 5:11-14; Philippians 2:9-11; Hebrews 13:8; John 11:25-26; Psalm 75:3; Matthew 13:36-43; Luke 3:16-17; I Corinthians 3:11-15; II Peter 3:9-13; I Timothy 4:10; Revelation 20:11-15; Revelation 20:5; Revelation 21:1-5 (KJB).
"God so loved the world," meaning every living human He ever created, and He will make certain that they all return to faith in Him as their Savior because He can never lose anything He has ever created. Ecclesiastes 3:14 (KJB). No living human will ever "perish" into eternal death. John 3:16 (KJB). Jesus will never "condemn the world" because He came to save the world, meaning His entire, living human race. John 3:17; Luke 20:38 (KJB). Believers saved by grace are not condemned, but God will have to cast unbelievers into one of the three regions of death when they die. John 3:18 (KJB). Jesus described the condemnation of unbelievers, and it is not an eternal condemnation. This condemnation simply means that they remain in the "darkness" of the Devil's world until they return to faith in the "Light of the world," John 3:19-21 (KJB). Christ will visit all unbelievers in the end of the world, and He will make certain that they all return to faith in the Light. John 1:9; John 1:29 (KJB).
Jesus "giveth life unto the world," meaning every living human that He ever created. John 6:33 (KJB). God's gifts are always eternal. Romans 11:29 (KJB). Jesus sacrificed Himself "for the life of the world," not just for those whom He would save by His grace. John 6:51 (KJB). The world, meaning the Devil's kingdom, hates Jesus. John 7:7 (KJB). Unbelievers will "die in your sins" because they are "of the world," meaning the Devil's kingdom. John 8:23-24 (KJB). Jesus did not say that they would be dead forever. The world, meaning the Devil's kingdom, cannot give peace to Jesus' followers. John 14:27 (KJB). There is the "prince of this world," meaning the Devil's kingdom, and there is the "world," meaning those in the kingdom of God who will know that Jesus loves His Father. John 14:30-31 (KJB). Jesus has "overcome the world" that causes tribulation, meaning the Devil's kingdom. John 16:33 (KJB). The word "overcome" in the Greek means to subdue, conquer, and prevail. Christ gained a complete and absolute victory over the Devil, spiritual death, and all evil when He rose from the dead. Revelation 1:17-18; Matthew 28:18; I John 3:8; II Timothy 1:10; I Corinthians 15:26; I Timothy 4:10; Revelation 21:5 (KJB).
Jesus clearly had two different meanings for when He used the word "world," and that which He meant can be easily discerned by the context in which He used that word.