It could be either or both or neither. Did you compare the old to the new before installing? How shot was your old one? If an alignment was done with a worn one, the steering wheel would not center the same with a new one. The settling and sagging of the front springs over time, or a leveling or lift kit, would also affect the trackbar's effective length.
Does the truck go down the road straight without pulling? Is the front axle still centered under the truck? A trackbar won't affect the alignment of the front wheels per se (caster, camber, toe-in), it affects how the front axle centers under the truck and how it tracks with the rear axle.
If the truck drives fine and the axle centers well, you can clock your steering wheel back to center without affecting alignment by first parking the truck with the tires pointed straight ahead, then loosening the clamps on the draglink adjuster sleeve going to your pitman arm and turning it one way or the other until the steering wheel centers. Make sure the key is in a position to unlock the column before doing this and save yourself a ton of crawling under and back out by having someone sit in the driver seat and tell if you are going the right way and when to stop.
Don't forget to retorque those clamp bolts when finished!!!