Measurement of the energy distribution of trapped and free electrons in a current-free double layer