For each of the n vertices, we will extract the min edge from the heap. The heap has a size of k, and each extraction operation takes $log(k)$ time. So total time will be $O(n*log(k))$