first you need to identify your controller.
From that you can work out what pins.h file it is using in marlin.
In the pins.h file you swap the pin numbers so that the fan0 pin is the desired port.
You recompile and upload.
From that you can work out what pins.h file it is using in marlin.
In the pins.h file you swap the pin numbers so that the fan0 pin is the desired port.
You recompile and upload.