It's not really about having to choose between these two - they're genuinely similar in character. The Yamaha YZF-R3 and Kawasaki Ninja 400 are close across pretty much every spec: around a liter of displacement, 40+ horsepower, weight hovering around 170 kilos. They're comfortable to learn on, and a crash won't destroy your budget. But there's one thing most people don't pay attention to: the difference in riding position and ergonomics. On the YZF-R3 you sit more upright, which for a beginner is easier in terms of control and confidence at lower speeds. The Ninja 400 is a bit more sporty in its posture, and not everyone adapts to it quickly.
The second thing is maintenance. Both brands have good service networks in the country, but Yamaha parts are cheaper by roughly 15 - 20%, and that adds up over time. Plus it's easier to find consumables for the R3 at regular shops, not just at official dealers. If you're going to service the bike yourself (which is useful for a beginner), the difference is even more noticeable.
In your situation, I'd advise not getting hung up on choosing between them, but actually going and sitting on both bikes in person. You don't pick a bike based on numbers alone - it's also about how you feel in the saddle. Comfort and confidence in that first year are 80% of your success.