That's the only solution. Space travel isn't it.
Well, we can make it so that every human can have at most one child. If the rule is enforced perfectly, each generation will have at most half as many offspring, and the series sum of 1/2 + 1/4 + 1/8 + ... is 1, leading to at most a doubling of the population, even if everyone lives forever.
They can "accidentally" be born sterile. Shh, nobody tell.
I'd expect this approach would just slightly delay the population issue meanwhile creating a massive black market for pledge-breakers.
People might be mistaking more abstract, existential urges with more plain ones. Do you really want to, in some kind of sense, propagate yourself through time after your death? Or do you just want to fuck, and perhaps also take care of little people (they're so cute...)?
Evolution and survival happens to most species with less developed and abstract brains. I don't see why our own needs for survival would be tied to some idea of "carrying on ourselves after we die".
That would be fine if we had a billion people on Earth, but whatever number ends up being stable, it's an orthogonal issue.
Space travel it is.
There's lots of good reasons for humanity to go into space; population control is not one of them.
It would be nice to reverse Idiocracy tendancies (Stupid people procreating more than intelligent leading to a general decline)
Anything more, like only allowing the smartest or the most wealthy is going to get dystopian pretty fast, I would think