You have already......
Powered off the Wi-Fi router?
Powered off the new iPhone?
Restarted the Wi-Fi router?
Powered up the iPhone again?
Is that correct?
The next thing to do would be a Forced Restart. Force restart iPhone - Apple Support. It's bit tricky....follow the instructions carefully. You may need to try this a few times.
There are really only two possible results with the Forced Restart......
1) The phone returns to normal operation and you can connect to Wi-Fi and continue the set up
2) Or, there is likely a hardware problem with the phone
If you are at 2), it's time to get with Apple Support. Support