The impact of interplanetary transport on the charge spectra of heavy ions accelerated in solar energetic particle events