1. She wrote a diary during World War II.

2. She kept a diary during World War II.
3. She wrote in a diary during World War II.
[Are they all grammatical? What is the difference in meaning?]

4. He asked us to keep a diary in English every day.
5. He asked us to write a diary in English every day.
6. He asked us to write in a diary every day.
[Which ones are grammatical? Are they all grammatical? What is the difference in meaning?]

All are grammatically correct except #1.

There's very little difference in meaning among the 5 correct ones. These are just examples of variations in wording.