Filed under Scott in the WW1 Service Records (WO 363):

John GARD joined the Royal Navy as 2nd Class Stoker, c1898.
On 11 October 1898 the Commanding Officer of HMS Pembroke wrote to his counterpart in the Royal Scots Fusiliers to say that GARD had stated that he had deserted from the RSF in August 1896, having enlisted as JAMES SCOTT.
The details appear to match. (Unfortunately, no evidence which name is correct, nor what happened!).

Information from the SCOTT file is: Joined RSF at Hamilton, May 1895, declared age 22y 1m, born Charlestown, Mayo. Father JOHN.

Anc****y, SCO, pages 117981 to 118008