I had a quick look at the script without even running, just to better understand your intentions.
My guess about the error is the location point of the family because I see you worked in the ProtoGeometry environment (the Dynamo one) and then used directly its geometry to the doors’ creation.
Anyway, my suggestion is to simplify the graph and the script: here a Python that will create door at the center of the provided wall (only if you give the same number of walls and door types). On my side, this is working well, let me know if it is the same for you.
walls = UnwrapElement(IN)
doorsType = UnwrapElement(IN)
result = 
if len(walls) == len(doorsType):
# "Start" the transaction
for w, d in zip(walls, doorsType):
pt = w.Location.Curve.Evaluate(0.5,True)
lvl = doc.GetElement(w.LevelId)
newDr = doc.Create.NewFamilyInstance(pt, d, w, lvl, StructuralType.NonStructural).ToDSType(False)
except Exception as ex:
newDr = str(ex)
# "End" the transaction
OUT = result
OUT = "the number of the wall do not match with the doors \n" + str(round(len(walls))) + " walls / " + str(round(len(doorsType))) + " door types"