£1m grant aims to help community groups protect green spaces