Translation:I need to buy juice.
If the construction with треба is the normal way of expressing that you have to do something then "I have to" should be considered correct too.
Why is "I have to buy juice" incorrect?
I think that would be "Я маю купити сік" instead.
But why mehi instead of я