Orbital migration and the period distribution of exoplanets