You do have to contact Aifos directly as it is their responsibility to organise the guarantees with their bank - however, they are notoriously difficult to deal with so it is much better to get your solicitor (preferably Spanish) to deal with it.
Aifos do have to return deposits to people who do not have building license for their alloted apartments unless they offer (and agree) to make suitable transfers to other property, however, it was illegal for Aifos to take them (the deposits) in the first place.
The problem seems to be that Aifos are prepared to sail "very close to the wind" in these maters and as they will have no doubt already spent the deposits they have received (there is no evidence of any deposit money being held in any ESCROW accounts), they will be understandably reluctant to simply "hand it back upon request"? It is for this reason that you can expect delays of 3-4 months to get your money back.
Without the guarantee in place, you can only hope that Aifos don't slide into liquidation, in which case it will be near enough impossible to obtain refunds!
You will struggle to obtain a refund from Aifos if your alloted apartment does have a building license, even though they have failed to meet the contractual completion date and the best bet is for them to complete quickly and get the properties into the hands of the owners, although it will probably be a drawn out process to get them to finish the ancillary services (pools, landscaping etc) if their current performance is anything to go on?