How is n-gram different from k-mer?
Yes, they mean the same thing.  A n-gram is a sequence of n consecutive things (words, letters, whatever).  A k-mer is a sequence of k consecutive things (DNA basepairs).  The phrase k-mer is more common in computational genomics.

See https://en.wikipedia.org/wiki/N-gram and https://en.wikipedia.org/wiki/K-mer for definitions.