Hi
Upon first turning on "Encrypt iPhone backup" in iTunes, a password must be set for your encrypted backups. This applies automatically to all future backups, without needing to enter it again.
If you later wish to turn off backup encryption or to restore from an encrypted iTunes backup, it is necessary to enter the current backup encryption password.
If you have forgotten or do not know the password, then encryption cannot be turned off and the iTunes backup cannot be used. There is no way around this feature:
An alternative solution for transferring the content and settings to your new iPhone is to back up your old iPhone using iCloud and then to restore your new iPhone from the iCloud backup. (iCloud backups are encrypted as standard, so will also include your sensitive data).
Instructions are provided here:
Transfer content from your previous iOS device to your new iPhone, iPad, or iPod touch - Apple Support