This can happen if the hosts file is corrupted or the epicgames.com line has been changed to an incorrect address. Resetting the hosts file may fix this issue.
To reset your hosts file check out this Microsoft support article: How to reset the Hosts file back to the default