Like all other ecological systems, a forest consists in a living environment and a nonliving environment, the latter composed of air, rocks, soil, and water.
consists in→consists of
consist in 表示“存在于……中,以……为主要部分”,而 consist of则表示“由……组成”,结合题干信息“森林由生物环境和非生物环境组成”,可知要用of。