Converting code from Arduino to PIC

I doubt you'll find some magic converter utility. You probably just need to start working through the code line by line, including any libraries you used. I suspect you'll find that a lot of your code can be used as-is or with minor modifications until you get down to the architecture specific code.

After a quick search I found two different hardware packages that add support for PIC32 to the Arduino IDE:

There might be others.

I realize you don't want to use the Arduino IDE anymore and these don't support your specific chip anyway but maybe that core code could serve as a reference for how you can implement the Arduino API functions you need to convert your firmware without starting over from scratch.