Cogenesis from neutron-dark matter oscillations