The VIMOS VLT Deep Survey: redshift distribution of a IAB < 24 sample, and the effect of environment on galaxy evolution