yes its dragon fly nymph there are quite predatory so be careful with your smaller fish, i imagine it was drawn into the filter as a egg, or even managed to force its way in when it was smaller.
I want to keep trout someday...beautiful fish. I have the next best thing. Celestial Pearl Danios look like a cutthroat, brooke, and rainbow all rolled into one. That's the tank where this larva came from.
Oh I do know what kind of water they prefer. Trout like well oxygenated water and cool water. Their pH range is slightly acidic to slightly alkaline. They prefer medium to hard water.