pinMode not working on Arduino Due

Pins 0 and 1 are used by Serial. Choose another one and your sketch will work.

See Greynomad pinout diagram for the DUE.