Optimistically (yet not naively) I would like to believe that the World, in terms of human society, won't end.
At least not while the Earth is still around. And hopefully not after that either.
I reckon that we won't destroy ourselves in any wars (not to say that there won't be countless wars), and that providing we don't suffer from unfortunate extinction events (such as extreme solar flares removing our atmosphere, or large asteroid collision, or plague) we should be able to colonise other planets in our solar system and even at some stage we'll colonise other systems, or have self-sufficient colony stations in orbit around our planets or those of other systems.
In a state like that who knows what could truly end humanity. Would it be ourselves or other creatures?
Would we as an intergalactic species survive on until Andromeda and the Milky Way collide? Or even further, in the proto-galaxy that'll form from that?
Could we spread ourselves so far throughout the stars that we could never truly be gotten rid of? Maybe there will always be a little cluster of us hiding away somewhere.
Perhaps if that was the case then the only way our species (since I suppose society would split and pull away into it's own unique pockets) would end would be in a galactic event, or philosophically at a state where we no longer resemble the humans we currently are?
There are no precursor races of scientifically adept species that we know of.
We're the first species our planet, maybe even galaxy has ever produced which has gotten to this state of development.
There's no precedent to say what will wipe us from existence. Maybe that'll never happen before the end of the Universe.