I've had this exact same problem, at least 4 times over the past 5 months on my 2016 Leaf SV. Most recently today.
Each time it happened the car was driving, in motion, and suddenly it shifted into neutral and I got the error "T/M system malfunction, see dealer".
In the first three cases, it...