The easiest place for self hikes within in walking distance of the ship is probably in Skagway. Here is a link with some info:
https://www.nps.gov/klgo/planyourvisit/hiking.htm
In Ketchikan, there is some good hiking around the Ward Lake area, but you would need transportation. We generally rent a car.
Same in Juneau - there are hikes at Mendenhall Glacier, Perseverance Trail, and Treadwell Mine, but all would require you to have a means of transportation to get there.
One option in Juneau that is walkable from the ship is to take Mount Roberts Tramway to the top, (or you can hike up, but that is strenuous and muddy at times), and there are hiking trails at the top that you can take from the Visitor's Center area.