Using density-functional calculations within the generalized gradient approximation (GGA)+U framework, we investigate the structural, electronic, and magnetic properties of the ground states of SrFeOn(n=2 and 2.5). The magnetism calculations show that the ground states of both SrFeO2 and SrFeO2.5 have G type antiferromagnetic ordering, with indirect band gaps of 0.89 and 0.79 eV, respectively. The electronic structure calculations demonstrate that Fe cations are in the high-spin state of (dz2)^2 (dxz ,dyz)^2 (dxy)^1(dx^2-y^2)^1(S=2), unlike the previous prediction of (dxz ,dyz)^3(dxy)^1(dx^2)^1(dx^2-y^2)^1(S=2) for SrFeO2, and in the high-spin state of (dxy,dxz,dyz,dx^2-y^2 ,dz2)^5(S=5/2) for SrFeO2.5.