I had a similar problem when I changed the filter after buying my car. Whoever worked on it previously had done something funky to the female threads on the nuts at either end. Probably JB Weld or something stupid to permanently bond them. The threads on the filter were fine and the new filter was tougher to get on than the old one was to get off, and new lines threaded on to both equally well.
In the end, the mechanic cut part of the old line out and added a new one in with new flanges. You don't want to do entirely new lines, as the one going forward to the engine is quite expensive and impossibly complex to route without some pretty specific tools.