WARNING: This page is about a different car, the 2017 Subaru Outback and 2017 Subaru Legacy. However, it is still accessible from the selected car via links, so may be relevant.
Fig 1: AT Shift Lock Control System Components Location - With Push Button Ignition Switch (1 Of 2)
Courtesy of SUBARU OF AMERICA, INC.
Fig 2: AT Shift Lock Control System Components Location - With Push Button Ignition Switch (2 Of 2)