When the gospel is preached to all nations, then the end will come - Matthew 24:14
And this gospel of the kingdom shall be preached in all the world for a witness unto all nations; and then shall the end come.
During this age, the gospel of the kingdom will be preached throughout the world, as a witness to them. God, in His plan, wants people to hear the gospel and will give them the opportunity to become a part of His kingdom until He determines. Once the end comes, the opportunity for salvation does as well.