Replace rotting porch treads with trex?
It should be just that simple, yes.  I don't know if I would recommend the Trex brand though.  They've had lots of problems in the past with mold issues.  Not sure if those are still a concern or not, but you might want to think about another brand of composite decking.