If you employ a VPN, disconnect from it and retest. VPNs use a Edition of a proxy server at your conclude so can at times lead to errors.
This thorough posting includes a in-depth Evaluation of normal 504 Gateway https://woracious.com/seo/ramifications-of-the-504-error-on-seo/