more info please.
does it do this all the time? while driving, idling, under load, coasting? how bad is the RPM change (how many RPM)?
did your longblock come with sensors and electronics attached or did you have to re-use everything from your old engine? where did the new engine come from? is it reman or just a junkyard pull?
my first thought would be a vacuum leak from something not getting hooked up when the engine was installed.
EDIT: why did you post in both the 3.0 and 4.0 forums? what motor is in this truck?