A “net zero school” designed to reduce carbon emissions has closed before admitting a single pupil because of low demand.