A MAXScript run by Deadline MUST return a valid result signifying whether the script succeeded or not. It can be either a Boolean (True or False), or a String value containing the equivalent (“True” or “False”).
A one-liner that returns a MAXObject value does not return a success of failure value, and is thus producing an error.
You can change your script to either
Pyramid widthsegs:1 depthSegs:1 heightsegs:1 width:19.6222 depth:17.7426 height:20.2188
True
if the outcome of the actual object creation plays no role, or