You will get no credit for your peds training in IM. So you need to start as a PGY-1. You'll need to match into a new program. If there's an IM program where you're located, you should start by talking to the IM PD.
Scratch that, you should talk to your Peds PD first, let them know.
App season starts very soon. If you want to apply this year, you need to get going.
All of this assumes you're doing fine in your current program. If you're having trouble in your current program and trying to bail to IM, then that's a whole different issue.