When I moved house I lost the remote for the fire TV stick and when my replacement arrived I found I can't pair it because the "lost wifi connection" message means nothing else seems to work until I press OK, which I can't do because I can't pair the remote.
I would guess you simply deregister the fire tv from your amazon account on rhe amazon website and then the fire tv will reset and you will be forced to connect pair remote, connect to wifi andmconnect to your correct amazon account.
This is taken from the formal amazon moderators post further down th e page which actually probably answers your question instantly:
Join Date: 10/6/2017
If you purchase a new or additional remote or controller for your Fire TV your can pair it using the following instructions:
To pair an additional or replacement Fire TV remote:
Select Settings from the Fire TV menu.
Open Controllers & Bluetooth Devices.
Select Amazon Fire TV Remotes, the select Add New Remote.
Press and hold the Home button on your new remote for up to 10 seconds.