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 is His slave and Messenger.
As long as you vowed to do an act of obedience to Allaah, the Exalted, you are required to fulfill your vow. The Prophet, sallallaahu ‘alayhi wa sallam, said: "Whoever vowed to do an act of obedience to Allaah, the Exalted, must fulfill it ..." [Al-Bukhari]
The vow should be fulfilled according to the manner that the person intended while making the vow. Therefore, as long as your intention, while making that vow, was to donate this money to that specific mosque, then it is incumbent on you to donate it to that very mosque. The fact that the mosque does not have a donation box is not an excuse for you to donate the vowed money to another mosque. You may give the money to the mosque management or those who are responsible for the mosque, regardless of them being an official or non-official authority, provided that they are reliable and trustworthy. If the management of the mosque is not trustworthy, and you cannot use that money in carrying out repair and improvement works in the mosque personally, then it is permissible for you to donate the money to another mosque.
Allaah Knows best.