She explains in her chronological timeline (Doctor Who: Confidential) that she though she knew it was her in the space suit (and that the Doctor would survive the shooting), she had promised the Doctor that she would keep it a secret. She does, however, make a reference to the fact that she knows more than she's letting on in the same episode. When Amy asks River how she can possibly be okay with everything that transpired, River states, "the Doctor's death doesn't frighten me. Nor does my own. There's a far worse day coming for me."
She had to pretend she didn't know what was happening, she lies just as much as the Doctor, she knew that if she told them what was happening, well, spoilers :)