Might be bit late but just in case somebody else sees this post like I did. In my case it seems like the /config/www/nextcloud/config/config.php reverted back to an older version and that is why the update shows for an old version even though a newer version is already installed. I manually updated the current version to what is actually installed and I was then able to run the updater from there and continue forward.