Problem: Jeremiah was told here to “write this man down as childless.” However, Jechoiachin had a son, Shealtiel, who is listed in Matthew 1:12.
Solution: First of all, the verse does not say he would actually be childless. Jeremiah was simply told to write him down “as if childless” (niv). Further, this is explained by the last part of the verse, namely, “none of his descendants shall prosper, sitting on the throne of David, and ruling anymore in Judah.” This is true of His immediate successors. And it is even true of his long-range successor, Christ, who was not an actual son of Jehoiachin but only a legal son through his legal father, Joseph (see comments on Matt. 1:17). Jesus, however, was the actual son of David through Mary, His actual mother (cf. 2 Sam. 7:12ff; Luke 3:23, 31).