Judges11:31

וְהָיָה הַיּוֹצֵא אֲשֶׁר יֵצֵא מִדַּלְתֵי בֵיתִי לִקְרָאתִי בְּשׁוּבִי בְשָׁלוֹם מִבְּנֵי עַמּוֹן וְהָיָה לַיהוָה וְהַעֲלִיתִהוּ עוֹלָה׃

then whatever comes out of the doors of my house to meet me, when I return in peace from the children of Ammon, shall be the Eternal's, and I will offer it up as a burnt offering."

Judges 11:31

וְהָיָה הַיּוֹצֵא אֲשֶׁר

Shoftim / Judges 11:31 · Pshat

Judges 11:31

וְהָיָה הַיּוֹצֵא אֲשֶׁר יֵצֵא מִדַּלְתֵי בֵיתִי לִקְרָאתִי בְּשׁוּבִי בְשָׁלוֹם מִבְּנֵי עַמּוֹן וְהָיָה לַיהוָה וְהַעֲלִיתִהוּ עוֹלָה׃

then whatever comes out of the doors of my house to meet me, when I return in peace from the children of Ammon, shall be the Eternal's, and I will offer it up as a burnt offering."

Pshat פְּשָׁט

A vow and a mistake

A vow made in fear and in haste can bind the one who made it in ways he never imagined. What did Yiftach promise?

Metzudat David: the vow is twofold: what is fit for an offering will be offered as a burnt offering, and what is not fit will be holy to the Eternal. Rabbeinu Bahya: Yiftach (Jephthah) erred when he offered his daughter as a burnt offering. He thought a vow works like a king's ban, but a vow cannot make an offering of what is unfit for an offering. What he did proved that he was not learned in Torah.

How Metzudat David and Rabbeinu Bahya explain it

Metzudat David Shall be the Eternal's

That is, if something comes out that is not fit for a burnt offering, it will be holy to the Eternal: it will remain always in holiness and not be put to ordinary use.

Metzudat David And I will offer it up

Then I will offer it as a burnt offering, if it is something fit for a burnt offering.

Rabbeinu Bahya And I will offer it up as a burnt offering

And now go and learn the error of Yiftach (Jephthah), who erred here when he offered his daughter as a burnt offering. He thought: when a king of Israel vows or declares something banned (חֵרֶם), his ban or vow takes effect so that a man or men may be put to death, and whoever transgresses his ban is liable to death. So too, he thought, when one vows in time of war to make an offering of a man or men, the vow takes effect.

And surely he erred greatly in this. The ban of the king and the Sanhedrin and their oath take effect only on those who rebel against them or transgress their decrees and ordinances. But it does not take effect to make an offering of what is unfit for an offering. This is what our sages said: he did not even owe a money payment for her to the Temple. And what he did proved that he was not learned in Torah.

Takeaway

A ban (חֵרֶם) is a prohibition declared by a king or the Sanhedrin. For example, Shaul (Saul) declared a ban on eating on a day of battle (Shmuel I / I Samuel 14:24).
By the Torah, a person cannot be an offering. Burning one's children in fire is an abomination before the Eternal (Devarim / Deuteronomy 12:31).
How this story ended is told next: Yiftach's daughter came out to meet him (Shoftim / Judges 11:34–40).