It is impossible because it's base is not circular. A solid of revolution is obtained by rotating a plane curve around some straight line, that is, the axis of revolution that lies on the same plane. The closest to a square pyramid applying this concept is by rotating a right triangle around the opposite or adjacent side (the axis), but the shape that you get is a straight circular cone.