Male guppys will somtimes mate with over fish, its partly down to their high sex drives and partly down to agression as mating with fish of the same gender or over species is not a sign of love but rather domination over the weaker individual- the chances of the swordtails getting pregnant though is imposible as swordtails cannot crossbreed with guppys. Personally i would just get some more female guppys to keep his attention off the swordtails .