I'd say take it to a competent mechanic who can test it and do a proper diagnosis. It's easy to change but is not a cheap part. But it might not be the issue, which could be just a dirty air filter or any number of other issues. I also recommend you get yourself a factory service manual. It contains a lot of good troubleshooting info. But the process still requires testing equipment. I would not go to a dealer. But first - Did you get no kind of warranty from the seller? No 30-days or whatever? How many miles does it have on it?
By the way, welcome to the forum. Keep us posted on how it turns out.