I think you might be remembering "An Alien Music" by Annabel Johnson. The main character is only 15 at the beginning of the book, but her brother is older and works for something like NASA. When a bacteria (or some genetically engineered organism) that is supposed to clean up oil spills doesn't work right, the earth is dying.
She runs away to see her brother and gets there the night that he is going to be taking off in this experimental spacecraft (I think originally designed to go to Mars) with a small crew, plus some other random women they'd found so they'd have even numbers and be able to have a large enough gene pool. The captain agrees to take her (instead of another random woman) because she and her brother have native american blood.
I think there's a mutiny on the ship and maybe something is damaged, so they know they won't be able to terraform Mars enough to live on, so they go back to earth. I think it's pretty much deserted (everyone died), but is habitable enough that they will be able to use the terraforming equipment that was meant for Mars to live.
The other thing I remember is that she is able to stall having to "pair off" until after she's 16 (she lies about her birthday so it's actually later than that). By that time the guy she was "supposed to" be with has disappeared for some reason, and she and the captain have fallen in love.