Serial1 / Serial2 with Arduino nano esp32

I want to use a fingerprint sensor with an Arduino nano esp32 and the Adafruit Fingerprint sensor library. It works fine with an Arduino Uno. My problem now is that the nano doesn´t really seem to have hardwareserial 1 and 2. I researched that they should be on GPIO 9 + 10 || GPIO 16 + 17. I tried using Serial1 which should be GPIO 9+10 -> D6+D7, but it didn´t work. Serial2 is not possible, cause the nano esp32 does not have the GPIO 17...
Any ideas which Serial I should use and which pins they are on the microcontroller?
(Serial 0 is not an option because the esp32 needs to be connected to my PC)

#include <Adafruit_Fingerprint.h>


#if (defined(__AVR__) || defined(ESP8266)) && !defined(__AVR_ATmega2560__)
// For UNO and others without hardware serial, we must use software serial...
// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino  (WHITE wire)
// Set up the serial port to use softwareserial..
SoftwareSerial mySerial(2, 3);

#else
// On Leonardo/M0/etc, others with hardware serial, use hardware serial!
// #0 is green wire, #1 is white
#define mySerial Serial1

#endif


Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

Welcome to the forum

You can assign which pins are used by the Serial interfaces

See ESP32 UART Communication Pins Explained with Example

Thanks for the quick answer. I've already been so far. I have:

#include <Adafruit_Fingerprint.h>
#include <HardwareSerial.h>


HardwareSerial SerialPort(1);

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

I know that I could change the pins for the SerialPort by using:

SerialPort.begin(57600, SERIAL_8N1, 2, 3); 

This is usually called in the setup() funtion. But this wouldn't make any sense in the code and also doesn't work. Is there a way to define my hardwareserial directly with the wanted pins? Or how should I change the code so that the object finger gets the right Serial?

Why not ?

Yes, using that sentence, I was able to change the ports, in my case 5 and 6, and it works to me.
Thank you!!