Access to the profession of an astronaut can give higher education in the profiles of Life support systems, thermostatting and protection of rocket and space complexes and Operation and testing of spacecraft, interorbital transportation means and their technological equipment. These training profiles are available at MAI. Here you can familiarize yourself with them in detail. And, of course, you need to be absolutely healthy.
To a flight school, preferably a military one. You need to become a pilot of the highest level and have absolute health. It is desirable to grow even below average.