Bitcoin Core 0.18.0 is compatible with any wallet version from 2017, if you want to check you can download any Bitcoin Core release. Bust most probably you are misspelling your password.
You could try also from the console. Use this command to decrypt it for 60 seconds:
In Bitcoin-Qt click Window -> Console.
walletpassphrase your-wallet-passphrase 60