I will go with the info you gave me - 40 days and 40 nights.
(Hopefully, not with 40 days and 40 nights of rain)
Ending, in Salt Lake City in mid-July.
Starting in Seattle? Portland?? Vancouver???
Plus the option to do a good deal of back/dirt roads.
Since you don't have a lot extra time for staging -
Flying into and out of a major airport is pretty important.
Since the rainy season in winter/spring ends from south to north -
Southern Oregon is a better bet than northern Oregon -both better than -
Southern Wash. is better than northern Wash. which is better than B.C.
Also elevation is a factor - the lower you are in early June the better.
I figure that if you start near Seattle -
You can ride to Glacier N.P. then turn south for Salt Lake.
I - June 5 to 14 - Washington state to N. Idaho
II - June 15 to 24 - N. Idaho to Glacier
III - June 25 to July 4 - Glacier - GDMBT - Grand Teton
IV - July 5 to 14 - Grant Teton - Salt Lake
You would have 10 days to do each section -
Maybe 400 miles for the first three and 350 for the last.
Here's a possible option for the last section.
https://ridewithgps.com/routes/19836162
Greys River Road is fantastic.
And Hwy 150 over the Uintas would make for a fantabulous finish.
Greys River Road in September - in July you should have wildflowers