He vowed to build a mosque but now he wants to sell the land
Question

                Allah has blessed me and I bought a piece of land in order to build a house on it. This was three years ago. After I bought it I felt how greatly Allah has blessed me and I vowed to make the ground floor as a Masjid, and make the upper floors as a home. I said in front of my relatives and friends that I vowed to do so and so. I found later that my financial situation does not enable me to fulfil my vow. As construction is expensive, I am willing to sell this piece of land in a few months.  Do I have to do something instead of building a Masjid so that I fulfil the vow, or as I will sell this land my vow is cancelled? 

As for paying Zakah, shall I pay Zakah on the amount by which I bought the land or the amount by which I will sell it? Please clarify the matter for me, may Allah reward you!.
Praise be to Allah.
    It seems from your question that you want to build on this 
    land that you bought and make the ground floor of it into a mosque, and that 
    you made this vow out of gratitude to Allaah for having enabled you to buy 
    this land, but now you cannot build on it and you are asking whether it is 
    permissible to sell it. 

    No, it is not permissible for you to sell it, because you 
    vowed to make the ground floor of it into a mosque, and to make the upper 
    floors into accommodation. So long as you cannot afford to build it at 
    present, then you must wait until Allaah enables you to build on it and 
    fulfil your vow, because you did not despair of being able to afford it and 
    fulfil this vow until now. 

    You do not have to pay zakaah during this period, because you 
    did not intend to sell it, rather you intended to build on it.