As far as location is concerned, ease of access and travel time count for far more than geographical distance. LHR is not too many miles from London (14?) but it's a hellish journey however you make it. LGW is further away but much easier (at least it used to be but then I keep away from the South of England nowadays!). An airport near an existing main railway line is usually the best option as they don't have to build a branch line and charge a massive premium to take the train. (I know, the Underground to LHR is not too expensive but it was always a difficult journey with luggage, kids etc).
Mind you, if you think access to London's airports is bad, just try Leeds-Bradford, especially now they are digging up the road!