The first one is correct. "Needs" is a lexical verb here - it requires as its complement either a to -infinitive verb or an object. So your first sentence is fine, but 'closed' cannot be an object, as you correctly sensed, which is why it's ungrammatical.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
AnonymousI am being told both is correctIt's regional. You may have heard that the second one is correct by someone who lives in a region (e.g. North Carolina) where that turn of phrase is commonly used. I don't recommend using that form.