He has a Wikitree profile:
which claims his parents were James Stuart and Mary Duguid. That couple did baptize a son James Stewart at Fyvie on 9 November 1841. Is your question whether this is the same James who came to New Zealand?
Here is another question about James D. F. Stuart. You can see comments that provide a proposed birth/marriage/death record. His death record names his parents John and Margaret, which doesn't fit with the baptism at Fyvie, which was to the son of James and Mary. On the other hand, the proposed birth record at that question is to John and Margaret, but in Perthshire, which is not close to Fyvie.
IMO, just looking at these records, both of these parental assignments are problematic, and this needs further research.
If you believe the Wikitree profile that states his parents were James and Margaret, then the profile has a link to an index entry for his baptism on Ancestry.com. Alternatively, you can find the image of the baptism on the Scotland's People website. You can see the index entry for free on that site, but you need to buy a few credits to view the original record.
That James was living with his grandparents Robert and Margaret Duguid in the 1851 census. After that, there a lot of other records on the Ancestry tree linked from his Wikitree profile. The Ancestry profile mentions family bible records, but it is not clear how they identified the parents of James D. F. Stuart. You might contact that tree owner to see if they are sure if his parentage is correctly identified, or if it is possible he was one of the many other people named "James Stewart/Stuart" and baptized in Aberdeenshire around 1842.