If you have only 3 days in total and your only option is using the train then you are pretty limited if you want both distilleries and riding and to base yourself in one place the whole time without traveling for too long. I'd limit your search to the main train line between Edinburgh and Inverness. Every stop from Perth north has riding close by that would be worth doing, but only a few have straightforward access to distilleries, and the likes of Aviemore and Pitlochry have lots of tourist facilities and good bike shops.
I'd say the area around Aviemore is the obvious destination for a riding weekend – around 3 hours on the train from Edinburgh, almost unlimited singletrack for all eventualities/ weathers/ seasons/ tastes, on the river Spey so Speyside malts are nearby (you could plan 1 good day of riding to and from classic distilleries of your choice).
Pitlochry is closer (around 2 hours) with plenty of good riding, very close to Edradour distillery via some nice riding (some other large ones further away).
Blair Athol has a Bells distillery (I think – that may not be interesting anyway) and is between Pitlochry and Dalwhinnie. Good riding in the southern Cairngorms from here, but a variety of singletrack is harder work to find than other places I've mentioned.
If you are big fans of the whisky you could stay at/near Dalwhinnie and ride around Ben Alder (an interesting mountain), Laggan Wolftrax (a trail centre) and the western edges of the Cairngorms. You could do this from Newtonmore, Kingussie or Aviemore for different riding options though. The distillery is on the doorstep and about the same size as the rest of the town put together.
Other suggestions mentioned by others... Epicyclo's suggestions are great for a 3 day trip, but not if you have to be based in one place only and maybe not if you need to coordinate riding/ distilleries with the train and flight times (for this reason I'd personally rule out anything north of Inverness). Fort William is and Garve are out for this reason too. Ignore suggestions for Glentress/ Innerliethen if you want to visit distilleries and use the train. Neither are close to a distillery or a train line unfortunately (though both are close to Edinburgh and definitely worth a visit for other reasons).
If you chose to hire a van/ people carrier (which might actually be good value for money depending on the size of your group) then the options are increased and you are able to visit a much wider range of distilleries/ areas to ride. Also, you might find it tricky to coordinate flight times and train timetables with reasonable time to make the most of the riding with just 3 days available, so van hire might be worth considering for this reason too.