Normally I'm all for 3d printing useful things but this is a bad idea. I know PLA will melt if left inside a hot car and I assume that under the hood can get just as hot if parked in the sun.
Also a few years back I was changing out the brake fluid on my motorcycle and accidentally spilled some on the fairings (body plastic), which are made of ABS. They started dissolving almost immediately.
So right off the bat, the 2 most-common-by-a-vast-majority printing materials are disqualified.
On top of that, as others have mentioned, brake fluid is hygroscopic - and 3d printed objects are rarely watertight, let alone airtight.
Spend the $13 now for a real part and save yourself a headache that's coming sooner rather than later. Keep an eye on the color of the brake fluid just in case it's absorbed a bunch of moisture already.
2017 Leaf S
OpenEVSE P50-D WiFi Kit