I think none of the answers clearly explains why HEAP is not the correct answer here.
We know that we run “Extract_Min” total |V| time, hence (V logV), but as I see that many have argued that Extract_Min will take O(1) time only since all weights are same. But this is wrong. Had it been Kruskal’s MST algorithm then that argument would have been true. But here we don’t push edge weights in the heap, but rather the distance from the source to any particular vertex, and we know it need not be same for all vertex. And hence it will take O(log V) for both EXTARCT_MIN and RELAX functions.
And hence simple BFS implementation is the only way we can get linear runtime.