The train journey is regarded as one of the best in the world so it's worthy of being a bucket list activity in its own right. That being said, if it's just a good photo of the Jacobite train passing over the viaduct you want, then I recommend getting the ScotRail train to Glenfinnan and waiting at the viewpoint.