Welcome Emmiebun,
Thank you for using Apple Support Communities. Based on your post, you forgot the password for your previous iPhone.
To make sure we're on the same page, is the iPhone disabled? If so, you'd need to follow steps in: If you forgot your iPhone passcode
If you don't remember the passcode, then you wouldn't be able to restore a backup with that passcode.
With that said, if you still wanted to restore from an encrypted backup, the only way to accomplish this would be to know the password that set up the encrypted backup. There is no way to restore the encrypted backup without the password: About encrypted backups on your iPhone, iPad or iPod touch
Wishing you well, take care.