My educated guess: they couldn't prove that he knew the girl was under 18. Besides, she wasn't much under 18. The witnesses are, well, hookers, and hookers have criminal records, drug problems, you name it, so if they were called as witnesses in a prosecution all of that would be fair game. So they decided not to indict.
Now all of those things that made it bad for criminal charges (the hookers, etc.) make it very, very bad for a confirmation hearing for the highest legal job in the country. Two very different things. Not a criminal; not an appropriate choice for Attorney General. Why Trump thought he was is, well, a Trump thing.