I was having this same problem last night, this is what I did to fix it, I used the command show quest variables and it showed the ref id for all three caravan prisoners so I used prid to bring up the reference id for the third one and moveto player and the quest updated and I was able to finish it.