Flights are not priced based on distance; they are priced based on the markets they serve. Two big cities with plenty of competition typically have a low price. A small town in the middle of nowhere only served by one airline is going to have outrageous fares instead. Supply / demand.