This is the title story from Asimov's 1990 collection Robot Visions, which was written specifically for that collection.
You're misremembering one detail: it is not the main character that travels into the future, though s/he was intending to volunteer.
I realized that of them all I was least valuable and might be considered the logical candidate. Indeed, I was on the point of raising my hand as a volunteer, but my facial expression must have given me away for one of the Temporalists said, rather impatiently, "Not you. Even you are too valuable."
Instead, they sent a (non-humanoid) robot, RG-32 or "Archie".
However, all the other points match or are very close:
- Most of humanity was wiped out in some disaster
"Ah," said a Temporalist, "but there are nearly ten billion people on Earth now, with half of them in serious misery. How did these people of the future get rid of nearly nine billion?"
"I asked them that, sir. They said it was a sad time."
- The environment had since recovered and reclaimed
"There was a huge project," said Archie, "for the reforestation of the land, sir. Wilderness has been restored where possible."
- while the remaining humans lived in a handful of cities
"There are no cities of our kind, sir. Life is much more decentralized in 2230 than with us, in the sense that there are no large and concentrated clumps of humanity."
- the rest of the character's scientist team celebrates
"The point is," said one Temporalist, "that it is a happy ending."
- The character speculates to themself that perhaps humanity was entirely wiped out
I spent some time thinking about it, and I grew more and more certain in my mind as to what had happened in the course of the next two centuries. I asked myself if population decreased from ten billion to one billion, in the course of two centuries, why did it not decrease from ten billion to zero?
Who were the billion that survived? They were stronger than the other nine billion, perhaps? More enduring? In short, then, were they human at all?
- The character then reveals that they themselves are a humanoid robot. (Possibly the first?)
Because, you see, I, too, am a robot. I am the first humaniform robot, and it is on me and on those of my kind that the future of humanity depends.