Okay so i found what was causing the p0365 code in my car. It was the exhaust camshaft sensor on the right side of the engine.(Side that has the airbox on it). Its located on the bottom front of the valve cover under a plastic piece. I read a bunch of forums and all i heard was that the car only had 2 camshaft sensors on the top of the engine, so i don't know if other ej20s only have 2 sensors. My legacy is a Japanese import and the engine code is ej20xdkcje. Here's the part number for the sensor 22056AA150. And here's some more info with pictures (its in Japanese) https://www.goo-net.com/pit/shop/0127346/blog/149352