The curse of Yechonya (or Yehoyachin) was revoked and his wife had two sons while he was in prison. This is rebuilding of the Davidic line through Zerubavel. Note that this means that since Yehoyachin was the last king who had children that survived (all of Tzidkiyahus children were killed at the destruction of the first temple) Mashiach would therefore continue in a direct line from King David through every king of the House of David through Yechonya to Zerubavel. If anyone is a descendant outside of that direct line, then he would not be eligible to become the Mashiach.
Vayikra Rabba 19:6
R. Zeira said,
I heard something with regard to this which R. Shmuel
b. R. Yitzchak expounded, but I forgot what it was.
R. Acha Aricha said to him,
Perhaps this is (the verse he expounded)
“Thus says the Lord: Write you this man childless,
A man who shall not succeed in his days.”
(R. Zeira) said, yes (that is the verse he said) “in
his days” he shall not succeed, in the days of his son he shall
R. Acha and R. Avin b. Binyamin in the name of R. Abba:
Great is the power of repentance, for it cancels out both the (evil)
decree and the oath.
The oath, as it says, “As I live - declares the Lord - if you O Conyahu, son of Yehoyakim of Judah were a signet ring on my right hand, I would tear you off even there” (Jer. 22:24).
And cancels the decree:
“Thus says the Lord: Write you this man childless.”
Yet latter it is written: “And the sons of Yechonya,
Asir his son, She’altiel his son” (I Chron. 3:17)
‘Asir his son’
because he was in prison (beit ha-asurim);
‘She’altiel his son’
Because from him the Davidic line was replanted.
R. Tanchum b. R. Yirmiyah said,
This is the Holy One Blessed Be He,
Who bound (asar) himself with an oath.]
That He asked (sh’aal) the court in Heaven
(to release Him from) His oath.
This shiur conttinues that the mashiach must be a direct descendant of all the kings (because it must go through Yechonya).
Before proceeding to the next section of the story, it is worth noting
that the notion that the royal line of David flows exclusively through
Yechonya is already suggested by the verses in I Chronicles 3. Verses
10 through 14 list the kings of Judah from Solomon to Yoshiyahu. Verse
15 lists the four sons of Yoshiyahu, including Yehoyakim. Verse 16
lists the two sons of Yehoyakim, Tzidkiya and Yechonya. Following
this, the verses to the end of the chapter go on to record several
generations of Yechonya’s descendants, presumably down to the time of
the writing of Chronicles. This genealogy suggests that the royal line
of David is continued only by Yechonya. The implication is that had he
not had children, David’s line would have come to an end.
I also found The Three Pronged Message of Chagai, Zechariah, and Malachi and Its Relevance for Our Times - Part 3 by Rabbi Chaim Jachter which also seems to point to Zerubavel as the melech, as well as Ezra-Nechemia - The Most Relevant Sefer in Tanach - Part 1 which also points to Zerubavel as the next melech.
Rav Yoel Bin Nun argues that there is another crisis that Sefer Ezra
quietly and implicitly teaches us how to manage. This crisis revolves
around the failure of Zerubavel to emerge as the Mashiach. The first
six Perakim of Sefer Ezra speak of the years that Zerubavel served as
governor of Eretz Yisrael on behalf of the Persian Empire. It seems
that the Jews had great expectations of Zerubavel. First, it is
important to note that Zerubavel was the great grandson of Yehoyachin
(Yechanya), the last king of Judea during the period of Bayit Rishon
(Divrei Hayamim 3:16-19). Thus, the Persians empowered a Jew who was
part of the Davidic line (and thus potentially the Mashiach) to govern
Eretz Yisrael. This presumably raised the hopes among Jews that the
glory days of Bayit Rishon could be restored and even improved upon.
Second, both Chaggai (2:21-23) and Zechariah (6:12-15) seem to
prophesize that Zerubavel had the potential to become Mashiach, or at
least to restore Jewish sovereignty over Eretz Yisrael. Unfortunately,
these promises did not materialize (their fulfillment was delayed
until the time of Hasmoneans and beyond) and must have left the Jews
in Eretz Yisrael profoundly demoralized. Indeed, a sense of crisis is
expressed in Nechemia 9:37 (see the broader context), where it is
stated, “UVeTzarah Gedolah Anachnu,” “We are in great distress.” Also
see Ezra 9:8-9 where similar emotions are expressed.
Abarbanel on Zechariah 6:12 says that the crown of the kingdom belongs to Zerubavel and his descendants, but he himself will not be crowned as he is a "shoot", not yet grown. Metzudas David says that the Mashiach will be descended from Zerubavel. Similarly on Chagai 2:23
There is a web site that discusses the lines of descent from Zerubavel through the ages.
Descendants of Zerubavel Rashei Galut (Exilarchs), Gaonim and Rabbis.
The page is too big to copy here, so just follow the link.