Being able to vote to close bountied questions is a recent change. Previously putting a bounty on a question made said question immune to closure for the duration of the bounty, which caused some frustrations, as questions that were clearly off-topic (and had been missed initially by curators, we are human after all), were getting bountied and therefore nothing could be done about them apart from moderator flagging.
When you bounty a question, you are "promoting" it to the community and therefore the question will likely get more views. As such if you bounty a question that is off-topic, or a duplicate, you should expect that question to be closed. In the event it is closed, your actions should be the same: edit said question to meet the requirements of the site or why the duplicate post did not answer your question.
If you can't improve the question, because it is off-topic, your bounty is lost; learn from the mistake and don't bounty off-topic questions. You don't need to do anything.
If the linked question did answer your problem, great! Your bounty got you the answer you wanted, and served its purpose. Unfortunately you can't give your bounty to an answer on the linked duplicate, so the reputation is also "lost" and therefore you don't need to do anything. I'm sure, however, the community would be more than happy to vote on a feature-request* asking for the ability to give a bounty to an answer on a linked duplicate, should a question be closed as a duplicate during the bounty period.
*There is now a post for this: If a bountied question is closed as a duplicate, allow the bounty to be awarded to an answer on the duplicate