Neutron occupancy of the 0d5/2 orbital and the N=16 shell closure in 24O