4x4: remove caliper & bracket, remove rotor. Place new rotor on hub, replace caliper bracket & caliper.
4x2: it's "old school". Remove caliper and bracket, remove dust cap, remove cotter pin, remove spindle nut, slide off rotor & hub. If you're replacing the rotor with new, you'll probably want to install new wheel bearings at the same time so the races match up. Pack the bearings with grease, install the inner and seal, put the rotor on the spindle, install the outer and washer/"seal", torque spindle nut to spec to seat everything, then back off about 1/2 turn (just enough that the rotor spins freely), install a new cotter pin, replace the dust cap, replace the caliper bracket & caliper. This truck is one of the few new(er) vehicles that hasn't gone to unit bearings on the front wheels.
Note that the 4x2 rotors are different part numbers depending upon whether or not you have 4WABS or just RWABS. The 4WABS parts have the tone rings for the wheel speed sensors, the RWABS rotors don't. And you can't get the tone rings separately. And it's nearly impossible to get the original tone rings off the old rotors without breaking them or damaging them to the point they're unusuable. You can use the 4WABS rotors on a RWABS truck without difficulty -- the only difference is the tone ring.