"But also for the sins of the whole world." - 1 John 2:2
That is, not for the Jews only, for John was a Jew, and so were those he wrote unto, but for the Gentiles also. Nothing is more common in Jewish writings than to call the Gentiles עלמא, "the world"; and העולם כל, "the whole world"; and העולם אומות, "the nations of the world"; and the word "world" is so used in Scripture.
...
This phrase, "all the world", or "the whole world", in Scripture, unless when it signifies the whole universe, or the habitable earth, is always used in a limited sense, either for the Roman empire, or the churches of Christ in the world, or believers, or the present inhabitants of the world, or a part of them only, Luke 2:1; and so it is in this epistle, 1 John 5:19; where the whole world lying in wickedness is manifestly distinguished from the saints, who are of God, and belong not to the world; and therefore cannot be understood of all the individuals in the world; and the like distinction is in this text itself, for "the sins of the whole world" are opposed to "our sins", the sins of the apostle and others to whom he joins himself; who therefore belonged not to, nor were a part of the whole world, for whose sins Christ is a propitiation as for theirs: so that this passage cannot furnish out any argument for universal redemption; for besides these things, it may be further observed, that for whose sins Christ is a propitiation, their sins are atoned for and pardoned, and their persons justified from all sin, and so shall certainly be glorified, which is not true of the whole world, and every man and woman in it; moreover, Christ is a propitiation through faith in his blood, the benefit of his propitiatory sacrifice is only received and enjoyed through faith; so that in the event it appears that Christ is a propitiation only for believers, a character which does not agree with all mankind; add to this, that for whom Christ is a propitiation he is also an advocate, 1 John 2:1; but he is not an advocate for every individual person in the world; yea, there is a world he will not pray for John 17:9, and consequently is not a propitiation for them. Once more, the design of the apostle in these words is to comfort his "little children" with the advocacy and propitiatory sacrifice of Christ, who might fall into sin through weakness and inadvertency; but what comfort would it yield to a distressed mind, to be told that Christ was a propitiation not only for the sins of the apostles and other saints, but for the sins of every individual in the world, even of these that are in hell? Would it not be natural for persons in such circumstances to argue rather against, than for themselves, and conclude that seeing persons might be damned notwithstanding the propitiatory sacrifice of Christ, that this might, and would be their case."
- excerpt from John Gill's Bible commentary on 1 John 2:2
(emphasis mine)