As you rightly point out God has condemned human sacrifice. Thus, what is going on with Jephthah? The Navarre Bible commentary explains Judges 11:29-40:
The Bible contains clear laws which, in addition to forbidding the killing of an innocent person (Exodus 23:7), regard human sacrifice as a very grave sin, a crime and a form of idolatry (cf. Leviticus 18:21; 20:2-5; Deuteronomy 12:31; 18:10; Micah 6:7). Human sacrifice was common among Israel's neighbors, as can be seen from Ugarit and Phoenician texts and from the book of Kings (2 Kings 3:27) which reports the sacrificing of the first-born son of Mesha, king of Moab; there even seems to have been an instance of it in Israel (cf. 2 Kings 16:3). But in all cases it is condemned. However, the sacrificing of Jephthah's daughter is reported without any clear negative criticism and the event was commemorated year-by-year (v. 40). The episode certainly is disconcerting, but it may be that the author (writing at a time when no one was in any doubt about human sacrifice being an abomination) chose to respect the traditions that had come down, cruel and harsh though they were, in order to convey a lesson about the sacredness of vows and promises. Vows are such holy things that they should always be kept. But, for that very reason, they should not be made rashly. This teaching is repeated elsewhere in the Bible in reaction to abuses involved in the fulfillment of vows, especially by those who made them hurriedly and then went back on them (cf. Numbers 30:3; Deuteronomy 23:22-24; Ecclesiastes 5:3-4; cf. also Leviticus 27:1 ff).
When revelation reaches its fullness, that doctrine on vows and promises made to God become quite clear: a person may, out of devotion, promise God that he will perform some act — say some prayer, give alms or do some other good work. Keeping this promise is a sign of respect for God's majesty and of love towards a faithful God. Sometimes, that promise may take the form of a vow, that is, of the "a deliberate and free promise made to God, concerning some good which is possible and better" (Code of Canon Law, c. 1191, 1) which "is an act of devotion in which the Christian dedicates himself to God or promises him some good work" (Catechism of the Catholic Church, 2102). If having made a promise or vow, one realizes that one has promised something wrong, one clearly should not keep the promise: to do so would not be proof of fidelity to God; it would be sacrilegious. Therefore, Jephthah's action cannot be justified.