The majority of scholars are of the view that it is obligatory to do Hajj immediately for everyone who has the means.
Ibn Qudaamah (may Allah have mercy on him) said in al-Mughni (3/212):
If a person is obliged to do Hajj and he is able to do it, he has to do it straight away and it is not permissible for him to delay it. This is the view of Abu Haneefah and Maalik. That is because Allah, may He be exalted, says (interpretation of the meaning):
And Hajj (pilgrimage to Makkah) to the House (Kabah) is a duty that mankind owes to Allaah, those who can afford the expenses (for one's conveyance, provision and residence); and whoever disbelieves [i.e. denies Hajj (pilgrimage to Makkah), then he is a disbeliever of Allaah], then Allaah stands not in need of any of the Aalameen (mankind, jinn and all that exists)
[Aal Imraan 3:97]. End quote.
What is meant by having the means is having the physical and financial ability to do it.
It says in Fataawa al-Lajnah al-Daa'imah (11/30):
Having the means with regard to Hajj means being in physical good health; having the means of transportation to reach the sacred House of Allah, by plane, car or mount, or by being able to pay for that according to one's situation; and having sufficient provisions for the journey there and back. This is on condition that this is surplus to the expenses of those on whom one is obliged to spend until one comes back from Hajj. A woman should also be accompanied by her husband or a mahram even when travelling for Hajj or Umrah. End quote.
Shaykh Ibn Uthaymeen (may Allah have mercy on him) said:
Having the means is of two types: having the physical means and have the financial means. Having the financial means is a condition of it being obligatory and having the physical means is a condition of performing it. End quote.
Al-Liqa' al-Shahri, 1/391
As you have the means, it is an individual obligation upon you to go for Hajj, and this takes precedence over giving charity to your poor neighbour, because he is one of those on whom you are not obliged to spend and your charity to him - when this is the case - comes under the heading of voluntary and naafil actions, and what is obligatory takes precedence over what is voluntary.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
Doing Hajj in the manner prescribed in shareeah is better then charity that is not obligatory.
But if he has relatives who are in need or there are poor people who are so poor that they need maintenance, then giving charity to them is better.
But if in both cases it is voluntary, then Hajj takes precedence because it is an act of worship that is both physical and financial. End quote.
And Allah knows best.
Reproduced from Islam QA