Nissan Xterra 2005 p1757

What the OP describes is a classic symptom of a problem with a Nissan front brake solenoid valve.
Because that valve is controlled by the Transmission Control Module, the effects of failure of that valve include a problem getting into gear, and/or shifting problems.

I agree that a competent shop is called for here, but the likelihood of needing a new transmission is…slim…and, more than likely, simply installing a new brake solenoid valve will resolve the problem.

Oil filter?
Huh?
I suggest that you avoid the shop that attributed the problem to your oil filter.