This is complicated .
First, to even get legally valid proof of the debt you need to get the solicitor to swear and sign a document that the loan was made.
Then you need to go to the county court and get a judgement for payment.
Once you have that you have to give them time to pay. If they don't pay you then have to employ a bailiff to collect the debt.
If they don't have the cash to pay and no asetts that can be seized there is nothing you can do. Remember that to collect £5800 the baliffs will need to collect assets to the value of at least £50,000 as the property can only be sold for around 10% of the purchase price. You can not seize their home if it is the only place they have to live, you can not seize 'essential' items like a cooker , or basic furniture, even a car can not be seized if they can prove that it is 'essential'
Sorry to be so negative but you really have very little chance of ever seeing this cash again.
The no win no fee solicitors that you employed should never have given you the impression that they would speak for you in court.
I do not think you can 'sell' the debt and even if you can there must be proof that the debit exists , which there is not at present.
What actually happened in court ? If you lost the action then the debit has been legally written off . If the case was just dropped you may be able to bring it again. Please tell us what actually happened in court. As I said IF the case was bought and lost then that is the end of it you have lost it for ever and there is no way to get the cash.