Long walk
A quick measurement of the map suggests about 15 km as the crow flies. Trains take 16 to 19 minutes from Zug to Arth Goldau, at the base of the Rigi.
Your guess of about 1,500 meters elevation is pretty close: my map says 1,798.
It is a great hike on a day with good visibility, and with the trains you can walk as much as you want, riding the rest of the way.