While this is true, Yiftach failed to ask Pinchas (who was the gadol hador) the question as to what to do. He insisted that Pinchas should come to him. Pinchas in his pride, insisted that Yiftach come to him.
As a result, Yiftach in his arrogance refused to accept that he could have the oath annulled or declared invalid. This caused everyone involved to be punished.
In his ignorance, he refused to believe that it could have been totally invalid to begin with and he would not listen to anyone who he considered "beneath" him. His daughter could not defy him as he used his power as the leader to force whatever was done to her to occur.
According to those who say that she was not killed, just like Levi was dedicated to Hashem (they were also the tribe in Mitzrayim that were the equivalent of priests), Yiftach's daughter was consecrated to Hashem.
WHY DIDN'T YIFTACH ANNUL HIS VOW?
Yiftach is an example of the many people who have very high principles
but lack the detailed knowledge of the Torah to know how properly to
apply them in practice. Yiftach IMAGINED he was bound by his vow, and
his high-minded determination to carry out what he thought was his
obligation brought him to an unparalleled perversity. Even Abraham was
not commanded to KILL Isaac, and indeed according to the commentators,
Yiftach did not actually KILL his daughter. Rather, she was condemned
to remain unmarried in a state of permanent HISBODEDUS (isolation) and
divine service except for the few days of the year when her maiden
friends would come to comfort her (see Metzudos David on v 37 and
RaDaK on v 40).
The Midrash brings out the absurdity and criminality of Yiftach's
condemning his only child to a life of celibacy, thereby destroying
the continuity of his own line. Not only was Yiftach criticized but so
too were all the rabbis and scholars of his time and even Pinchas the
High Priest (who according to tradition was still alive despite the
passage of over 300 years since he entered the Land with Joshua).
Through a mixture of high principles and pride, Yiftach would not go
to Pinchas to nullify his vow, although the HALACHAH specifically
permits this. Likewise Pinchas would not go to Yiftach to nullify the
vow, reasoning that his own status as Priest required that Yiftach
should come to him. Between the two of them, the poor girl "died".
Pinchas was punished with the withdrawal from him of holy spirit
(Chronicles I, 9:20 - "HaShem was with him PREVIOUSLY"). Yiftach was
punished with an illness akin to leprosy in the modern sense of the
term, which caused his limbs to drop off one by one while he was still
alive. For this reason "he was buried IN THE CITIES of Gil'ad" (ch 12
v 7) i.e. in several different places.
Indeed the fact that the daughter failed to get a declarartion from the Sanhedrin is treated as a punishment for Yiftach.
Haftorah: Yiftach Declared a Vow to Hashem
She said to him: But Yaakov Avinu, who vowed, "Whatever you will give
me, I shall tithe to You" (Bereishit 28: 22) and G-d gave him twelve
sons -- did he sacrifice one of them to G-d? Moreover, Chana, who
said, "She made a vow and said, Hashem ... if you take note of the
suffering of your maidservant ... then I shall give him to Hashem all
the days of his life" (Shmuel I 1:11) -- did she sacrifice her son
before G-d? She [Yiftach's daughter] said all of these things to him,
but he did not listen to her. When she saw that he didn't listen to
her, she said to him, allow me to go down to the Beit Din, perhaps
they will find an opening for your vow.
She went to them, but they did not find an opening for Yiftach to
release his vow, on account of the sin that he slaughtered of the
tribe of Ephraim. About him it says, "A pauper who robs the destitute
is like a torrential rain, which leaves no food." (Mishlei 28:3) "A
pauper who robs the destitute" -- this refers to Yiftach who was a
pauper in Torah, like the stump of a sycamore tree, who would rob the
destitute, as is says, "[The men of Gilad] would say to him: Now say
'shibolet,' but he said, 'sibolet' -- for he could not enunciate
properly, and he would slaughter them." Therefore, "like a torrential
rain, which leaves no food" -- he had one who could release his vow,
but "leaves no food" -- G-d hid the halacha from them, so that they
would not find an opening to release him of his vow.