Whole world does not appear hereActually your whole world works from 1 John but not the gospel since he only used that phrase in his epistle . Just posting to be fair here and being objective as possible
John 12:47 (KJV)
47 And if any man hear my words, and believe not, I judge him not: for I came not to judge the world, but to save the world.
the point is any unbeliever is comprehended in the term world
and that is parallel to
John 3:16-17 (KJV)
16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
17 For God sent not his Son into the world to condemn the world; but that the world through him might be saved.
and is soteriologically significant