Paper that discusses similarities between the envelope glycoprotein of retroviruses and syncytin: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3758191/
This field is called paleovirology, and the paper also discusses in some more detail how fragments of viral DNA can end up in human DNA.