Marvel's Captain Marvel had been a male originally and then a female. If you remember the X-Men character Rogue, her superpowers came from permanently absorbing a female Captain Marvel's powers leading to that person (Carol Danvers' death).
When I was a child, the teenager who Bruce Banner saved from the gamma bomb that then turned Banner into the Hulk, was named Rick Jones. He had the nega-bands that when he smacked his wrists together he would trade places with a male Captain Marvel (a Kree supersoldier) and become a superhero.
The original Shazam/Captain Marvel was a copy of Superman by another company that DC eventually obtained the rights to. Superman was originally basically Edgar Rice Burroughs' John Carter of Mars with Earth replacing Mars and Kal-El of Krypton replacing John Carter.