The speed of sound really depends on the temperature and moisture in the air,
and the sound of the thunder doesn't necessarily travel straight from the lightning
to where you are. So we can't say exactly.
But if we use the nominal speed of 340 m/s, then 6 seconds means 2,040 meters,
or about 6,700 feet, or about 1.27 miles.