Ah, ok. Those steps only work when WiFi is ON and the network is at range. Strange that you can't keep the connection for the short time required for this process.the forget and modify option comes when WiFi connected. the problem is connection is not stable disconnecting within a second.
TWISIt may cause a little work, but connect to your router with one of your other phones or computers and change the name - add a digit or a letter to it. Then you'll have to reconnect all your other devices (including the one you used to change that).
Then your phone won't have any connection for that (new) network and you can set it up using the new password (the one you changed to that caused all this to start).