A multigroup model for the slowing-down of energetic ions in plasmas