The spatial distribution of ions implanted into solids subject to diffusion and surface sputtering