Officials said that the detective was driving an unmarked vehicle up Jamaica Avenue in Queens when he was struck in the forehead Wednesday evening.