If the human race is going to survive then yeah
Either that or there will be like these ships that we send out in random directions that have their own internal sustainable ecosystem (solar power of some sort) and people would be living in there until they get to something habitable.
Pretty sure that will happen eventually but not before we colonize all of the solid planets beyond our own
When the sun goes kablooey we can't be on Earth, the last estimate I heard said that there was a chance that half of the Earth would be burned up entirely and otherwise it would be completely incinerated