First, judges generally hate pro se litigants, especially in federal court. The judge will usually find any reason possible to rule in favor of a member of the bar. However, that said, you probably got a fair hearing.
Trying to get attorney fees awarded long after the fact, and pro se, is a really rough road. I have never heard of a separate action for an award of attorney fees years after the fact. The ONLY way would be you filing a civil suit for abuse of process or malicious prosecution. But as you did NOT win on the merits, no action for malicious prosecution would stand.
I suspect the judge allowed the testimony to determine if there were grounds to allow attorney fees when the previous dismissal was voluntary and you didn't actually win on the merits. What you brought in a way was a maliciious prosecution case which has 4 different elements you have to prove.
You could file a motion for reconsideration with a well written brief. If that doesn't work, you could appeal to the appropriate State or Federal Court of Appeals where you would probably give the judges a good laugh. (You say district court which could be a state court or a federal district court, but you don't specify.)
Then the other side has to file a response. Depending on local rules, you might get a reply brief. Then the judge has to issue a written decision based on the law. He might still rule against you but you will know why in detail and have something solid to appeal from.
However, I think you are wasting your time.
-----------------
I am not an attorney but have some experience in this area.

