A young male swordtail will often look like a female because the dominant male swordtail can be a bit overbearing if an obvious rival shows up. The most extreme case, in my own fish room, saw a group of 6 males where the last one finally admitted being a male when he had been in my tanks for 2 years. I had bought 6 fish that I thought were young females about 4 to 6 months old. At 2 years, they were all absolutely gorgeous males but the first didn't grow a sword for the first 6 months and the last was right before I sold the group along to people who could breed those males with their own females. The fish knew all along that they were all males and I never did see a breeding attempt in the tank, even when it looked like I had mixed sexes.