Sample variance for supernovae distance measurements and the Hubble tension