This is not a hadeeth reported by Al Bukhari. This is known as Mo’allaq which is not according to Al Bukhari’s conditions. This is why it has no Isnad; chain of narrators.
Besides, this is an opinion of a companion that might be authentic and may not be. The majority of scholar said that zakat shouldn’t be given to people wanting to go to hajj!