"I need to go."
Translation:Мені треба іти.
Should be accepted. In Ukrainian there's a small difference between "іти" and "піти", but it's very intuitive and delicate, so I guess both can be translated as "need to go", if one wants to be flexible.
But actually піти is more like "to start going", "to get going", it's a point in time, not a time period, and іти is just "to go" or "to walk" which happens in a time period
What about context? In English "I need to go." can mean that you have to leave to go somewhere or that you have to use the bathroom. Would you say this if you need to use the toilet?