In Matthew's genealogy we read "And Josias begat Jechonias* and his brethren, about the time they were carried away to Babylon" (Matthew 1:11)
The following passages in Jeremiah 22:24, 29-30 reveal to us why Matthew went to great pains to stress that Jesus was not the son of Joseph!
"As I live, saith YHVH, though Coniah* the son of Jehoiakim king of Judah were the signet upon my right hand, yet would I pluck thee thence..."
"O earth, earth, earth, hear the word of the YHVH.
"Thus saith YHVH, Write ye this man childless, a man that shall not prosper in his days:
for no man of his seed shall prosper, sitting upon the throne of David, and ruling any more in Judah."
Before presenting Jesus' credentials for 'messiahship', Matthew had to demonstrate the fact, the prerequisite, that Jesus was not descended from the 'disenherited' Jeconiah! For whatever reason, Matthew was not prepared to go any further than to prove this negative.
Luke, however, had no such qualms. He did not flinch from the task of proving the positive..that Jesus had an entitlement by a MALE line of descent to sit upon David's throne.
This single piece of information that Joseph was debarred from kingship casts off the shroud of theological muddles and reveals the startling homogeneity and clarity of the New Testament message. No more explaining away perceived 'conflicts' - the only 'conflicts' in the New Testament genealogies are those created by theologians and by doctrinal absurdities. The argument that Matthew was recording a 'virgin birth' is simply out of the question - indeed ludicrous given the true circumstances.
Had Joseph's lineage from David not been 'dead', however, there was no other factor to debar him from fathering the 'messiah'. This is clear from the opening Chapter of John where the disciples describe Jesus in a variety of ways including 'son of Joseph' and 'King of Israel'. It is also clear that the disciples were unaware that Joseph was descended from this 'dead' line.
Does it strike anyone as strange that theologians have not stumbled upon the truth - in nearly two millennia? Or if they do know the truth...why have they kept silent?
* Jeconias is the Greek form of 'Jeconiah' (1 Chron. 3:16-17; Jer. 24:1), and 'Coniah' (Jer. 22:24,28; 37:1).