There might be some confusion here - the Thomas Dunham referred to in the original post has no association with St John - he was born in St George, Charlotte County, New Brunswick Canada. His father is Joseph Dunham - land records show Joseph purchasing land in St George Parish in 1803 and that he is "of st andrews" at the time of the purchase.
The Joseph Dunham in MN and referred to in the Original post is the brother of Thomas. Joseph Dunham's death certificate indicates that his father is Joseph Dunham and his mother is Bathsheba Scott.
Census records for Joseph in MN - if you examine the actual microfilm - show that his father, Joseph Dunham of St George NB, was born in Long Island, NY. One census lists "New York" as place of birth of father and another lists "Long Island".
It was once thought that this Dunham family, of St George, NB, Canada, were descendents of the loyalist Asher Dunham. Recent DNA testing has shown this to be false - DNA testing proved that William H. Dunham, thought to be brother of Joseph Dunham is descended from Deacon John Dunham of Plymouth, MA.