I think you are running into the problem that is described here: Confirmation email link (after change) is broken ("Oops!") due to bad email customization
If the problem is that the user_notifications.confirm_new_email
text was customized prior to Discourse updating the link, the solution is given in this post: Confirmation email link (after change) is broken ("Oops!") due to bad email customization - #5 by gerhard