A court martial was standard procedure then for the loss of a ship. He was acquitted on any charges, so it was hardly a disqualifying mark on his career.
Really there's any number of things he could have been doing besides commanding a Starship. He could have been doing his archaeology thing, he could have had a desk at Starfleet command, he could be teaching at the Academy or doing his diplomat/mediator thing. Picard did say he represented the Federation in first contact with a ton of worlds after all.