I checked the Hungarian railways site and, indeed, this train no longer exists.
There is a direct train between Budapest and Sarajevo. It takes around 12 hours. Seen in groundedtravel:
Only one direct service operates each day between the two cities.
While it is unlikely that this train will sell out in advance of your
journey, it can be quite busy on Fridays and Saturdays. It can be
helpful to buy your tickets (and seat reservations) a few days in
advance if possible. Passengers are advised to get to the station
early in order to find a good compartment.
The return fare for this journey (which is significantly cheaper than
the one-way fare, for some reason) is €53.60.
On the moment of writing this, I see the departure time from Budapest is 9.56 and arrives in Sarajevo at 21.16.
Bus
According to Eurobusways there is no aparent direct bus connection. I did a further research with Google maps and nothing appeared.
Taking this into consideration, you may want to go through Belgrade. Note that the bus station for buses between Sarajevo and Serbian cities is not in the main Sarajevo, but in the Serbian part of it, so you need to use some extra transport to go to main Sarajevo.
See Balkan viator for this connection.
Shuttle bus / car
Rome2rio shows that driving can be the cheapest option (70-100€), whereas a shuttle bus can be more relaxing but a bit more expensive (100-110€). The above-mentioned Eurobusways can be a good way.