There is a city bus that does go to the Walmart store in Ketchikan. The bus does a complete loop of the city. There is also a crew bus that goes to the Walmart store in Ketchikan, but I think it is for crew only. As I recall the store was quite a ways from the cruise docks. The bus stops at the tunnel and the library, both stops are fairly close to the cruise docks.
Can't help you about Juneau as I have not yet visited that Walmart.
Hope this helps
Debra