Gravitational potential energy, depends only of the mass on which the gravity is doing work, and the displacement produced by this force.
As displacement depends only on the final and initial positions (in this case, the height of the hill), if we choose as our zero reference level the bottom of the hill, the change in gravitational potential energy will be as follows:
As we can see, the only value of distance involved is the height of the hill , so it is independent of the distance travelled.
An insurance company wants people to avoid risks because if the person meets with an accsident the expense of the medicines and treatment should be covered by the insurance company.