The confusion might be in the similarity between the subject and verb: 길 (road/way), 길다 (to be long). The sentence is specifying that the way itself is long. You can shorten it like this 길이 길어요 (the road/way is long). However since we want to specify which road is long, we have the part at the beginning. 학교에 가는 길 (the to-school-going road).
But the Duo-supplied prompts in the exercise expressly say "to the school," as above, yet the correction insists on "going to the school." The correction system is not to be trusted. The "teacher" does not understand English well enough, either, besides being given to silly pedantry.