In most cases replacing the valve is required. It can also be the result of low oil or electrical. Without knowing can't really provide a cost.
P0082 SUBARU - Intake Valve Control Solenoid Circuit Low Bank 2
Read more: https://www.autocodes.com/p0082_subaru.html