As long as a muslim has intended to perform Hajj and preparation has been made for it but they were not able to obtain the visa, they will be rewarded by Allah the Almighty for your good intention and efforts.

Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:

“If you had the intention to perform Hajj and you were prevented from fulfilling this duty, you need not worry: you can do it another time when your circumstances improve and the obstacles in your way are removed.
You should know that Hajj is only obligatory on those who fulfil two essential prerequisites, which are financial and physical ability, as well as the ability to go on the journey. In your case, since you were not given the visa, Hajj was not fard (obligatory) on you, so you do not need to worry. Anyway, Allah the Almighty will reward you for your intentions; however, that does not mean that you are excused from performing Hajj when you are able to undertake the journey”