I must admit, I found your question a bit confusing. You have paid out 24,000 euros, to secure your son's release from prison? Have I, at least, got that bit right?
What I'm confused about is the money you were told you had to go and pick up - presumably from Tenerife. What money is this?
Whichever money it is, your son, as far as I can tell from your submission, has got there first and collected this money, which you now wish to get off him.
It all seems quite a legal quagmire and I'm nowhere near qualified to advise you on what to do. I expect you've already taken this step, but I'll suggest it anyway: contact the British Consulate in Santa Cruz for advice.