I am at a dead end and hoping someone can help me. I have a James Johnston (1749-1829), b in Dumfries but died in Fleming County, Ky, USA in October 1829. James was born in Dumfries in May, 1749. He was with Gen Burgoyne, was captured and became a convert to the American cause. Supposedly was a Baptist minister after the war. I have his children's names if interested, but they were all born in the USA. His wife's name was Margaret Keith. Looking for any information siblings, parents, grandparents, etc.
Er .... after which war? The Seven Years' War, French Revolutionary War, Peninsular War, Napoleonic Wars, Russo-Turkish War, War of the Bavarian Succession .... to name but a few of the dozens of wars that took place during James Johnston's adult life.

There are 18 recorded baptisms of James Johns*n* in Scotland in 1749, of whom one is in Dryfesdale, Dumfries-shire (not the parish or the burgh of Dumfries). There could be many others whose baptism records, if the ever existed, have not survived.
Realistically, if you have exhausted the possibilities at
www.scotlandspeople.gov.uk you are going to struggle to find any reliable information further back.
You could try the National Records of Scotland
https://www.nrscotland.gov.uk/The (UK) National Archives
https://www.nationalarchives.gov.uk/ may have some record if he served in a British military unit
Dumfries and Galloway Archives
http://archives.dumgal.gov.uk/calmview/If he followed the Scottish naming tradition, the names of his children might provide a clue to the names of his parents.