Jesus' lineage went back to David through both the royal line of Solomon and the replacement line of Nathan. Note that the lineages listed in Matthew and in Luke both cross over at Zerubabbel, thus Jesus was of the House of David through both Nathan and Solomon, and through both Mary and Joseph, so that there would be no dispute for those who wanted to split hairs, or is that heirs, well either way.
He would be of the House of David without the lines crossing over. Inheritance rights through Joseph and bloodline through Mary.
In Luke, Shealtiel is the son of Neri. In Matthew, Shealtiel is the son of Jeconiah. These are two different sets of "Zerubabbels and Shealtiels"....a coincidence and still two separate lines.
A curse had previously been given to the Matthew line [Jeremiah 22:24-30] to give us proof for the virgin birth [Luke 3:23]. But....it was lifted later on anyway. [Haggai 2:20-23]
Numbers 27:1-9 This gives the Israelites the authority to pass the inheritance through the daughters when there is no male heir. [Jeremiah 52:10-11] There at Riblah the king of Babylon slaughtered the sons of Zedekiah before his eyes; he also killed all the officials of Judah. Then he put out Zedekiah's eyes, bound him with bronze shackles and took him to Babylon, where he put him in prison till the day of his death.
And again....not trying to split "Heirs" (that was good by the way, LOL) but Jeremiah was given a specific mission by God to insure that the Royal line of Judah was kept intact [Jeremiah 1:5-10]. Don't you agree?