July is probably the best time as the days are still long and that's the warmest weather. That will also be the most expensive month on the cruise lines as they also know it's the best month to go.
We did the Alaska cruise a couple of years ago and went on Norwegian. I liked this one best out of the cruises I've been on because they had free style dining. I liked being able to eat when and where I wanted. I don't like the cruises where you eat every meal at the same time each day and sit at the same table every time. The cruise we did was all down in the inside passage so we didn't go to Denali. Next time we do it, I'd do one of the one way cruises that ends in Anchorage and then spend a week or so exploring by rental car.