Zedekiah was not part of the line of Christ, so if his sons were killed that does not affect the prophecy. The bolded names are in the line of Christ:
1 Chronicles 3:15-17 And the sons of Josiah were, the firstborn Johanan, the second Jehoiakim, the third Zedekiah, the fourth Shallum. And the sons of Jehoiakim: Jeconiah his son, Zedekiah his son. And the sons of Jeconiah; Assir, Salathiel his son,
|