Some suggest that Luke gives Jesus’ descent through Mary, which is a possible, but somewhat strained explanation in light of Luk 3:23 which would otherwise seem to clearly indicate that Luke too is tracing Jesus’ line through Joseph. Consider also that since Mary was related to Elizabeth (Luk 1:36) who was “from the daughters of Aaron” (Luke 1:5) it is possible and perhaps more likely that Mary was not a descendant of David and Judah, but of Aaron and Levi. A perhaps better explanation given by the early church fathers is that Joseph was the legal son and heir of Heli (Luk 3:23), though the real son of Jacob (Mat 1:16), and that the two lines terminated in him (see Barnes’ notes on Matthew): “It was a law of the Jews that if a man died without children, his brother should marry his widow. Thus the two lines might have been intermingled. According to this solution, which was first proposed by Africanus, Matthan, descended from Solomon, married Estha, of whom was born Jacob. After Matthan’s death, Matthat being of the same tribe, but of another family, married his widow, and of this marriage Heli was born. Jacob and Heli were therefore children of the same mother. Heli dying without children, his brother Jacob married his widow, and begat Joseph, who was thus the legal son of Heli. This is agreeable to the account in the two evangelists. Matthew says that Jacob begat Joseph; Luke says that Joseph was the son of Heli, i.e., was his legal heir, or was reckoned in law to be his son.” Consider also the following from Barnes:
1. No difficulty was ever found, or alleged, in regard to [the genealogies], by any of the early enemies of Christianity. There is no evidence that they ever adduced them as containing a contradiction. Many of those enemies were acute, learned, and able; and they show by their writings that they were not indisposed to detect all the errors that could possibly be found in the sacred narrative. Now it is to be remembered that the Jews were fully competent to show that these tables were incorrect, if they were really so; and it is clear that they were fully disposed, if possible, to do it. The fact, therefore, that it is not done, is clear evidence that they thought it to be correct. The same may be said of the acute pagans who wrote against Christianity. None of them have called in question the correctness of these tables. This is full proof that, in a time when it was easy to understand these tables, they were believed to be correct.
2. The evangelists are not responsible for the correctness of these tables. They are responsible only for what was their real and professed object to do. What was that object? It was to prove to the satisfaction of the Jews that Jesus was descended from David, and therefore that there was no argument from his ancestry that he was not the promised Messiah. Now to make this out, it was not necessary, nor would it have conduced to their argument, to have formed a new table of genealogy. All that could be done was to go to the family records — to the public tables, and copy them as they were actually kept, and show that, according to the records of the nation, Jesus was descended from David. This, among the Jews, would be full and decided testimony in the case. And this was doubtless done. In the same way the records of a family among us, as they are kept by the family, are proof in courts of justice now of the birth, names, etc., of individuals. Nor is it necessary or proper for a court to call them in question or to attempt to correct them. So, the tables here are good evidence to the only point that the writers wished to establish: that is, to show to the Jews that Jesus of Nazareth was descended from David. The only inquiry which can now be fairly made is whether they copied those tables correctly. It is clear that no man can prove that they did not so copy them, and therefore that no one can adduce them as an argument against the correctness of the New Testament.