Travel by Car: The travel distance between Medjugorje and Belgrade is about 450 km, which according to Google directions should take about 7 hours, do to less optimal road conditions, travel time by car could although be considerable longer. The route goes via E73.
Travel by Bus: There are a limited number of bus departures between Medjugorje and Belgrade, the current schedule as well as ticket prices you can see here. Alternative it is possible to travel via Sarajevo or Zagreb in Croatia.
Alternative ways of travelling from Medjugorje to Belgrade
Travel by train: The closest train station is in Capljina (15 km from Medjugorje), from there is train to Sarajevo. The trains route between Sarajevo and Belgrade have been a bit on and off the latest years, the current status of you can check here.
Travel by plane: Only major international airport in Bosnia is the one in Sarajevo, Plane between Sarajevo and Belgrade are running parts of the year, you can check availability here.
Map with buses from Mejdugorje:
View Bus Medjugorje in a larger map