Gray, James, active 1776-1784, Major