This is an updated version of the script called "Move To Surface",
that you can find it in this same playlist on my YouTube channel.
To use it, select a collection of objects, click the script, pick a target geometry to drop the selected objects onto.
This updated version will consider the presence of groups, or/and objects that are in a hierarchy and will drop the topmost parent.