I was confused about the same thing, I looked it up, and as far as I could find 건 is the shortened version of 것을.
I found this on from Billy Korean, hopefully it helps.
These three contractions with 것 are also very common. 것, “thing,” becomes 걸 when used with the Object Marker (을/를). 것 becomes 게 when used with the Subject Marker (이/가). 것 becomes 건 when used with the Topic Marker (은/는)
Thanks for the explanations @BobaBunny5 and @the_crait. One thing I don't like is that Duolingo doesn't durectly go into explaining sentence structures and such. Anyways...maybe I have confused myself, but now how would you actually translate "It is important to sleep" to Korean?