I, like the previous poster, looked for an answer. The only thing that I can come up with, outside of that of trying to find out who "James" is given the poem references that name, is Jesus Christ.
Wheatly's poetry, "Poems on Various Subjects, Religious and Moral", speaks to the fact that she was highly religious. Given that she was also a slave, one could infer that her reference COULD be made based upon the fact that some slave owners did not allow talk of religion by their slaves. She could have been masking her religious theology.
Another idea is that she is simply mourning the death of a child, but raising it up at the same time given "cheerful resign at divine command."
This is a reach!! I honestly found no reference to a JC in the life of Wheatly other than James Madison and James Bowdoin, neither who have the initials JC.