First, let's consider the lineage of Matthew. Matthew 1:1 lists Yeshua as “son of David, son of Abraham.” Taken at face value, the verse makes it look like David is Yeshua’s father and Abraham is His grandfather.
In the Jewish mind, the word son could be applied to one who was not a literal, first generation son, as is commonly understood today. It could mean a descendant; which could be a grandson, great grandson, or son of a more distant generation. The custom of skipping generations can be called "genealogical abridgement."
This happened in Matthew – not every generation was listed. Let’s look at one in particular: In verse 11, Jeconiah is listed as the son (or descendent) of Josiah.
However, the name of Jehoiakim was not mentioned in Matthew’s gospel. Jehoikaim was the second son of King Josiah (1 Chron 3:15). Further study shows that Jeconiah was then Jehoiakim’s son (1 Chron 3:16, Jer 24:1, Jer 27:20). Josiah was Jeconiah’s grandfather.
Then I discovered something important about Jehoiakim. In Jeremiah 36:30, he is cursed by God: “Therefore thus says the LORD concerning Jehoiakim king of Judah: “He shall have no one to sit on the throne of David, and his dead body shall be cast out to the heat of the day and the frost of the night.” In other words, none of his children will ever sit on the throne of David! This is one reason that there had to be a virgin birth! Because of the curse on Jehoiakim, Joseph’s seed was ineligible to bring forth Yeshua son of David, because Joseph was descended from Jehoiakim.
So that brings us to the lineage written in the gospel of Luke. Joseph is listed as son of Heli, whereas in Matthew, he was listed as the son of Jacob. An unlikely source gives us a critical clue: The Jerusalem Talmud indicates that Mary was the daughter of Heli (Haggigah, Book 77, 4). Joseph was the son-in-law of Heli! Luke could rightfully call Joseph the "son of Heli" because this was in compliance with use of the word "son" at that time - there was no expression for "son-in-law."
Matthew’s gospel, written primarily to Jews, emphasized Yeshua’s descent from Abraham through Judah and King David. Although Joseph was not Yeshua’s biological father, he was His legal father, and that gave Him the legal right of inheritance. However, His geneology can be traced back to King David through Mary, literally fulfilling the promised Seed.
Luke’s gospel, written mainly to Greek believers, placed less emphasis on the descent from Abraham, Judah, or King David; and focused more on the lineage going all the way back to Adam and to God. Luke is thus demonstrating that eligibility for membership in the kingdom of God is offered to all people of the world through Jesus, the Messiah of Israel.