On the flux of high-energy cosmogenic neutrinos and the influence of the extragalactic magnetic field