2x4's will be absolutely fine. Just be sure to follow the age old trusted "template" for stand builds, which basically means never assemble a stand where your screws are load bearing.
Joey, "king of DIY", probably has the best stand builds on you tube for guidance. Just punch in something like "king of DIY aquarium stand builds", and you'll be in the right area.