Spectroscopy of neutron unbound states in 24O and 23N