All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
You have made a conditional vow, which is disliked in the Sharee'ah. Nevertheless, fulfilling such a vow is obligatory if the condition takes place.
Consequently, you should continue to fulfill the vow and you have no choice concerning this matter. You are not allowed to give up fulfilling the vow as long as you are capable to do so. The reward of fulfilling a vow after it becomes binding is better than the reward of charity because fulfilling it is obligatory, while charity is recommended. The reward of obligatory actions is greater than the reward of recommended actions. Nevertheless, if the vow was not yet made, then charity would be better because it is recommended while vowing is forbidden by the Sharee'ah and is absolutely disliked.
Allaah Knows best.