The distinction is that they are titles awarded by different space agencies. They both mean essentially the same thing and they both come from Greek. Cosmonaut is used by the Russian Space Agency. Astronaut is used by NASA, ESA, CSA, and JAXA. (that's the abbreviations for space authorities.