if engine rpm speeds up but truck slows down i would suspect slippage between motor and drivetrain.
standard or automatic transmission ?
proper tranny fluid and level ? (level too low or wrong type added ?)
since it only happens on long or steep hill i suspect fluid level related. i'd first try adding more, even a tiny bit more then full. 2 types of tranny fluid so check manual and use right type. use as little gas/engine rpm as you can get away with.
otherwise tranny needs shop to pull pan, change fluid filter, adjust stuff.
my tranny does not like prolonged heavy load. on long highway drives on long even gradual inclines, in hot weather, it gets hot and raises engine temp as it's got it's own lines thru rad to cool it.
i had to replace missing 3 of 6 bolts that hold tranny to engine. they had vibrated loose and fell out. also check 2 tranny holding bolts under tranny.