Another posting already discusses how you can change the pins to use spare stepper controllers for broken controllers by changing the pin layout. Assuming you are using a RAMPS board and using Marlin firmware, you should look at the pins_RAMPS.h file.
This file requires changes to address E1 to E0 and vice versa, please edit the file so that:
#define E0_STEP_PIN 26
#define E0_DIR_PIN 28
#define E0_ENABLE_PIN 24
#define E0_CS_PIN 42
is changed to:
#define E0_STEP_PIN 36
#define E0_DIR_PIN 34
#define E0_ENABLE_PIN 30
#define E0_CS_PIN 44
and also change:
#define E1_STEP_PIN 36
#define E1_DIR_PIN 34
#define E1_ENABLE_PIN 30
#define E1_CS_PIN 44
to:
#define E1_STEP_PIN 26
#define E1_DIR_PIN 28
#define E1_ENABLE_PIN 24
#define E1_CS_PIN 42
When the file is changed an saved, build and upload code to your board and plug the connector of the E0 stepper into the E1 header.