Watching LA X when Sawyer and Miles were burying Juliet and Sawyer asks Miles to find out what Juliet wanted to say, I don't think Juliet said anything to him.
When he's laying on top of the mound, he appears quite distraught. Most people would assume it's because he spent 3 years living with Juliet and Sawyer as a couple and can't believe she's dead.
But I have a theory that Miles can no longer communicate with the dead.
Something changed when Juliet hit the bomb and perhaps one of those things was that Miles was 'reset' and can no longer talk to the dead.
When he says to Sawyer that she wanted to say 'it worked', I think he was saying that because he knows now that it did work, otherwise he would be able to hear her. This is why he is so distraught as he's trying to hear her- he's lost the one thing in the world that made him special and helped him.