I don't really care, because most likely none of us will be there to find out. Also, its 2 very different questions. One is whether or not humanity will survive, the other is how long the Earth will survive. As noted, we already know in a billion years (or some vast distant future time) the Sun will swallow up the Earth when the Sun dies.
Humanity may not ever end, or we might have an unexpected gigantic unknown asteroid/comet hit us tomorrow, and effectively wipe out humanity just like that. Or, a deadly worldwide plague strikes, and with airplanes and travel, humanity has no chance to stop it from spreading. Or a hostile extraterrestrial advanced high technology race invade and either take us out and take the Earth for themselves (resources), or take over and use us as slave labor. There are all kinds of possibilities, all of which are remote, but still have a chance of happening.