I'm not sure what you think the significance of that quote is.
Melville didn't like Christianity -- or any religion much. He thought religion had brought about a lot of inequity in the world, based on what he had seen in his travels.
Ahab undoubtedly was meant to express a lot of Melville's rants against God.
But Ishmael called Ahab insane. So Melville was at least conflicted.
(He's in many ways the obverse of Dostoevsky.)
None of this speaks to his belief or doubts about the trinity or the Arien Heresy.