Terminal to direct pipeline from mid-east somewhere near Sheridan or something?
While gas prices are affected by the distance of distribution, they are most impacted by REGULATION. More regulations on ingredients and processing (lead content, additives, etc) for air quality and such are what affects the prices first. Then, the problem becomes distribution. "Boutique" gasolines formulated for all the local regulations and restrictions must be distributed accordingly.
What is ok in Iowa is NOT ok in Illinois. In fact, what is ok in rural Illinois is NOT ok in Chicago, per local regulation. So, if the closest refinery does not make the particular "boutique" brand your local area can have, it has to be trucked from further away, therefore increasing the cost even more.
Just another way our tax dollars are working for us. Basically, the states with the most green are the states with the fewest regulations.