You should type in the right password to decrypt your drive first then you can retrieve the data stored in it. Given that both the new password and the old one fail to open your drive, I guess that a new password set might make sense here.
You ought to list your disks to find the APFS volume disk that you want to change the password. Type in the following command line in Terminal:
sudo diskutil apfs list
Find the UUID of the cryptographic Disk User:
sudo diskutil apfs listUsers <your APFS volume>
Your APFS volume should be like disk1S1 or so.
You can change the APFS volume password then:
sudo diskutil apfs changePassphrase <your APFS volume> -user <the Disk User cryptographic UUID>
The Disk User cryptographic UUID should be like this: 12345678-1234-1234-1234567890AB