Because the official GNU archives rotate older versions into subdirectories, finding the exact 5.0.4 release requires precise navigation. Do download from untrusted third-party crack sites; they often inject malware into legacy software packages.
Some older package managers still cache version 5.0.4. For example, on a very old Debian or Ubuntu system: Ed 5.0.4 Download