How can I attach closet shelving supports where there are no studs,
A 2x2 glued to sheetrock won't support any weight.

Instead, go through the sheetrock and install a masonry anchor in the cinderblock. Put a screw through the 2x2->sheetrock->cinderblock