the 2 hard plastic vacuum lines coming from the transmission area come from the trasfer-case and are used to engage and disengage the central Axle disconnect on the front axle. those lines are long gone on my jeep (previous owner went with a cable actuator) I found a diagram of the system (see below) it should be the same for all yj's so if those liens come from the transfer-case and that diagram doesn't help someone else can chim in that is more familiar with the CAD vacuum system (from the diagram i can't tell where it gets the vacuum unless the t-case creates vacuum somehow)
as for what connects into that purple hard line, its either the red #1 line going the the vacuum solenoid, or the blue line that T's into the evap canister (im leaning towards the blue line). i don't remember which but as long as the tube size matches it shouldn't matter (as long as what needs vacuum gets it).. are there 2 or 3 hard lines that go behind the motor (im having a hard time remembering)
edit for your new post: test your tps and iac as you mentioned... when you turn the jeep off the iac motor should fully extend so that the jeep has extra air to start. (have you tired to start it while holding the throttle partially open to give it some air to test your lake of air due to no vacuum leak theory)
also make sure you plugged in the egr vacuum solenoid (it wasn't in your pic, it would make it idle like crap since i think if its not pluged in it lets vacuum go through which engages the egr but shouldn't stop it form starting would just make it run rough)