This is a simple tutorial on how to build a block swapper in Minecraft!
Add two sticky pistons, facing each other 3 blocks away. Add a sticky piston between.
Place your two chosen blocks next to the right piston.
Add two wood planks above the block in front of the sticky piston. Add a button on the top plank.
Add a redstone torch directly behind the button.
Add four blocks one block down beside the redstone torch.
Add redstone dust to the furthest block from the torch, and repeaters back to back on the other.
Add two redstone torches on the block above the piston. They should automatically turn off.
Add a wall around to cover up the redstone.
You have completed your redstone block swapper. Design it however you want!