Though some might argue that nothing in the Bible can be held as historically accurate, there is also no real proof to say that the characters and people within the Bible did not exist as historical figures either. So you may consider this an article of Bible history or Biblical myth, depending on your point of view.
If nothing else, this may show how a family tree can become convoluted over time depending on cultural and societal customs.
There are 2 main genealogies in the Bible for the ancestry of Jesus, and unfortunately they are not the same. They are found in the gospel of Luke (Luke 3:23-38) and Matthew (Matthew 1:1-16). Both links lead to another page that has each genealogy listed out. Though they both lead back to King David, the two different lines have inspired much research and theorizing. Though there are many theories as to why Luke and Matthew did not record Jesus’ lineage the same, there are a few of them that are better known (and more accepted) than others.
One of the oldest theories of these differences is that a woman named Estha married Mathan (Joseph’s grandfather), and had a son named Jacob. When Mathan died, she followed the custom of Levirate marriage and married Mathan’s brother Mathat. Then she had another son named Heli, making Heli and Jacob half-brothers. This would make Joseph the biological son of Jacob, and the legal son of Heli. This does create a more complicated issue, because if Mathan and Mathat are brothers, then why is their lineage not the same? Perhaps they themselves were only half-siblings by another earlier Levirate marriage.
Luke’s Lineage is for Mary
Another possibility that would explain the different family tree lines, is that the one presented in Luke is actually for Mary, not Joseph. Apparently, the original Greek text implies that Jesus was “thought of” as the son of Joseph, which might explain why the name Joseph is included at this point of the lineage. Since women were seldom included in genealogical records at that time, Mary’s name is not used and the next generation back was Heli (Mary’s father). Though this theory would be the easiest to apply, it is not proven in any way. It was first suggested in the 15th century by Annius of Viterbo, who is known for fictionalizing history. Nonetheless, the theory that Luke’s genealogy belongs to Mary persists today.
These are only 2 possibilities as to the reasons behind the different family trees ascribed to Jesus. There are many other issues surrounding these genealogies, including the fact that one is several generations shorter than the other and there are numerous historically proven facts that do not coincide with the order of names.
The Bible (NIV)
Wikipedia – “Genealogy of Jesus”
The Catholic Encyclopedia – “Genealogy of Christ”