It takes a few years to prepare for a space mission. It takes a couple of years just to get the background and knowledge that you need before you can go into detailed training for your mission. So most astronauts are astronauts for a couple of years before they are assigned to a flight. Once you are assigned to a flight, the whole crew is assigned at the same time, and then that crew trains together for a whole year to prepare for that flight.
Scholastic interview (1998)