"The detective asks where we went."
Translation:우리 어디에 갔냐고 형사는 해요.
So "where we went" cannot be placed after "the detective" and before "asks?"
The Korean sentence is very strange if it isn't wrong. I'm sure this was made by some computer program, not by a man.
Better word-by-word translations would be like these ones:
형사는 우리가 어디에 갔냐고 물어요.
형사는 우리가 어디에 갔느냐고 물어요.
형사는 우리가 어디에 갔는지(를) 물어요. : (를) is optional.
형사는 우리가 어디에 갔는가(를) 물어요.
All the sentences above can be substituted with '형사가' instead of '형사는'. The choice between '은/는' and '이/가' is quite subtle and sometimes fuzzy. Explaining the reason is beyond my ability.