I guess which model they pick for the Tanker depends on when they air force wants it. Right now Boeing can produce the Kc767a, and has shipped the first two to Italy to be completed (part of the deal). They're not getting any new civilian orders for the 767 so they can start pumping that version out at a dedicated factory.
The backorder for the 787 is already three years. I'm not sure how many backorders they have for the 777. The 757 line is closed. The 747 line is open with few orders left.
There was also talk about shutting down the 767 line because of weak sales --- they were counting on the tanker contract to keep the line running.
Both of these rumors are several years old...