These are similar sounds. The sound g is voiced (you use both your voice box and your mouth to say g), whereas the k sound is unvoiced (you do not use your voice box.)