There's a mirror of the R source code on github and this looks like the underlying kmeans code.
For future reference, here's a tutorial by Jenny Bryan on accessing R source code.
For functions that are called with .Internal() or .Primitive(), pryr::show_c_source will take you right to the function code. For example, running
pryr::show_c_source(.Internal(mean(x)))
will take you to https://github.com/search?q=SEXP%20attribute_hidden%20do_summary+repo:wch/r-source&type=Code. Unfortunately, this doesn't work for kmeans. I'm guessing this is because, as the output of getAnywhere(kmeans) indicates, kmeans_Lloyd is called with .C().