But the primary reason why Boeing chose the KC-767 based on the 767-200(ER) is the parking space used by the KC-767 is not much more than the parking space used by the KC-135, which means Air Force bases don't need to rebuild their ramp areas to accommodate a plane with a larger wing span. Since the production tooling for the 767 is already fully paid for, Boeing can use the 767 production jigs to produce as many as 300-350 KC-767's to completely replace the KC-135 fleet over the next 15 years.
With the record backlog Boeing has for this new airliner, and the fact that they are already two years behind schedule in development, even if the 787 were the perfect tanker there is no production capacity available to produce it.
USAF then replaces an outdated aircraft with another outdated aircraft.
But the primary reason why Boeing chose the KC-767 based on the 767-200(ER) is the parking space used by the KC-767 is not much more than the parking space used by the KC-135...
The ramp space is only a Boeing spin. Both aircraft perform quite the same out of the same ramp space because you'll need less KC-45 to perform the same task. The KC-45 is heavier but due to the bigger wheels the pressure doesn't differ that much.
The big difference between KC-767 and B787 or KC-45 is the fuselage. KC-767 needs additional fuel tanks on lower cargo deck. Neither a KC-45 nor a B787 would need additional tanks. On both of these aircraft the complete cargo bay is free for LD3 containers. A B767 can just use the smaller LD2 size.