Yep. if you've got a JR pass, there's no reason to use any other station.
I think I am remembering that not all the trains on that route stop there though? If so, make sure you are on one that makes local stops.
Make sure you have enough time to make the hike up the trail in daylight, but the shrine is also open at night and some of the paths are lit with lanterns for a way, so you might want to time your visit to finish right at nightfall so you can also see this aspect also.