5 possible causes for that error message:
1] Activation server is actually down. Very rare occurrence, and of short duration when it
does happen. Solution - try again.
2] Your firewall and/or antivirus software are preventing the necessary connection. Solution -
temporarily disable your firewall and/or antivirus software until the activation completes.
3] computer being used for activation has been used to jailbreak an iOS device in the past.
Solution - use a different computer.
4] iPhone has been jailbroken. Your favorite search engine may provide some direction, but jailbreaks often prevent
5] your region and/or timezone settings are inconsistent with your actual location. Solution - set region and/or timezone correctly.
You should also check this article: If you can't activate your iPhone - Apple Support. https://support.apple.com/en-us/HT201407