The Alaska Railroad describes itself as the "last whistle-stop" railroad in the country (at least in the off season). Tell them where you want to get off and/or flag them down (I'm guessing they have some guidelines about where/when, long straight portions, etc.) So not only would you be in spectacular country, but your trip could have whatever starting and ending points you wanted and you could change that on the fly.
And you can originate off a cruise ship in Seward or a 737 at the Anchorage Airport or a cab ride away in Fairbanks, so you needn't use a car at all. There is a station in Denali National Park from which you could take the park bus.