He has never been charged with a crime anywhere, yet he was put in solitary confinement, then held under house arrest for a very long time, then he asked for and was granted asylum by Ecuador because of a grand jury investigation against him in the US (and reports of a sealed indictment).
Asylum is an international law which is binding on all parties. Moreover the UK has consistently denied Assange's right to leave the embassy without arrest for medical treatment, and the conditions inside the embassy are not fit for detainment.
Assange is forced to either give up his asylum or his human rights, both of which are inalienable. The UN could not possibly have reached any other conclusion in the matter. International law is binding.
One might also consider three additional facts. Firstly, one of the complainants in Sweden said she had not been raped by Assange and that the police railroaded her. The other has said that she did not want to accuse Assange of anything. Note also that various women's groups have sided with Assange. Knowing the facts on record, they do not believe he committed a crime. Secondly, the case against Assange was closed and he was allowed to leave Sweden. It was reopened later, it is alleged, by a different prosecutor after political interference. Finally, under current UK law, Assange would not be extradited to Sweden because the prosecutor is not judicially independent in Sweden and no charges have been laid. In other words, he would not be subject to arrest and extradition under current law.
I doubt that those three facts played any part in the UN decision which was about his arbitrary detainment and various other violations of international law by the UK and Sweden, not about the case in Sweden itself.