לָכֵן֩ הִנְנִ֨י אֹֽסִפְךָ֜ עַל־אֲבֹתֶ֗יךָ וְנֶאֱסַפְתָּ֣ אֶל־קִבְרֹתֶיךָ֮ בְּשָׁלוֹם֒ וְלֹא־תִרְאֶ֣ינָה עֵינֶ֔יךָ בְּכֹל֙ הָֽרָעָ֔ה אֲשֶׁר־אֲנִ֥י מֵבִ֖יא עַל־הַמָּק֣וֹם הַזֶּ֑ה וַיָּשִׁ֥יבוּ אֶת־הַמֶּ֖לֶךְ דָּבָֽר׃
דרום זע, איך זאַמל דיך אײַן צו דײַנע עלטערן, און װעסט אײַנגעזאַמלט װערן אין דײַן קבֿר בשלום, און דײַנע אױגן װעלן ניט זען דאָס גאַנצע בײז װאָס איך ברענג אױף דעם דאָזיקן אָרט. און זײ האָבן געבראַכט צום מלך דעם ענטפֿער.
Rashi
And you will be gathered into your grave in peace. And what is the peace?12Although Yoshiyahu was killed in a battle with Paro Necho, he is considered as having died in peace because he died while the Bnei Yisroel were living in peace, before the destruction began.—Radak "Your eyes will not see," the destruction of the Beis [Hamikdosh].13See Maseches Moed Katan 28b.
Ralbag
Therefore, behold, I will gather you to your fathers: This means that upon his death he will be buried with his ancestors, and the disaster will not be during his days. It would appear that there were other prophets in Israel apart from Huldah. But he sent to here because of her proximity to him, because she was then in Jerusalem.