Has nothing to do with what truck your trading or buying.
Pull out your pencil and a loan amortizing app/calculator.
Looking forward only, what's in the past is done, look at what you owe now on principal and what you'll owe on principal in a year or whenever you want to switch trucks.
Compare that to what it's worth if you sold it today (sell it, don't trade it, you'll get more $selling private party 9 of 10 times) and what it will be worth in a year with xxxx miles on it.
That will tell you if you're upside down or not and how much.
Separate equation, take the remaining interest you have to pay on your loan to term vs paying that off (the $20-30k down on the new truck next year could pay off your loan as well and save you $xxxx in interest payments.
Now compare that to what you'll pay for the new truck, interest rate, etc. "Assume a purchase price and rate and amortize that loan out 1,2,4,7 years whatever is. Compare $ spent by then.
Hard to explain, but break it down to several different scenarios based on a set point in time in the future and run each scenario to see which cost s the least.
One of those scenarios can be keeping your (almost new) truck and adding $xxx for an out of warranty emissions rebuild since that is a big part of your consideration.
In general, you're going to spend more, trading off (low trade vs selling) early, spend more interest (you'll pay most of the overall interest charge in the first half of the loan term) by trading/selling in such a short term, spend more by eating the depreciation of yet another new vehicle and spend more by buying the next newest bestest truck on the lot.
Add up all that and you'll probably spend enough to fix the emissions on your own dime a few times over on your current truck.
You're already keeping the banker's kids in new clothes and private school. Don't fund his college savings too unless you "have" to have the new F350!