I agree that this jacket is not a military uniform. In fact it appears to be a very strange copy of the original painting, in which the buttons were completely different, and the coat was actually black(ish).
This is similar to the painting of Adam Winne , painted by Peter Vanderlyn, 1730, but with quite a few differences.
The painting is discussed at the Peabody Museum, Harvard web site when discussing puritan clothing:
The terms "modest" and "sober" speak to Puritan ideals that permeated
colonial New England. Even small items like gold buttons did not
escape Harvard’s watchful eyes. Both state and college laws forbade
wearing "any Gold or Silver lace, or Gold and Silver Buttons."
The portrayal of the buttons in the above image seems quite different from the ones on the pages linked.
Both Peter Vanderlyn and Adam Winne were of Dutch descent, and living in the New York area in this time. Peter, in Albany Institute of History & Art: 200 Years of Collecting, is stated to have served three years in the Dutch Navy, and the clothes here do bear some semblance to some images of Dutch seamen. I can find no record(so far) of Adam, the subject of the painting, as having military experience, however.