Don't know how factual it is, but a quick search came up with this info from Wikipedia:
"After the federal government agreed to charging Epstein on one count under state law, the prosecution convened a grand jury. Palm Beach Police Chief Michael Reiter later accused the state attorney of being too lenient and then transferred the case to the FBI. The grand jury returned a single charge of felony solicitation of prostitution, to which Epstein pleaded not guilty in August 2006."
Mueller was the Director of the FBI at that time. Alberto Gonzales was Attorney General from February 3, 2005 to September 17, 2007. I'm assuming he would have had the authority to assign Acosta at the U.S. Attorney in this case.
The leftists have been editing Wiki like crazy for the last few days to spin the Epstein case against Trump. It is much more enlightening to Google articles that were written a month ago and previously.