We need to focus on inhabiting just one other world, first. The longer-term problem of universal heat death will work itself out.
And so far we're doing a piss-poor job of it.
Taking care of what we have right now is the bigger priority because failing that we never will get off the planet anyway.
Getting off the planet requires a larger degree of international cooperation and funding than stewarding our own planet does. If we can't manage the one we certainly won't be able to manage the other. Also, it is something that we actually can do, if we set our minds to it. Whether or not we can actually get off the planet with meaningful numbers of people to a place that is no longer tied to the earth in some critical way remains to be seen.
And even that might not last long. Space is - sadly - currently not a priority.