While there's evidence that Boeing's chances were hurt by the NSA revelations, it's not true that Boeing was a clear favourite. Both Saab and Dassault had presented strong bids and were considered serious contenders, particularly as both offered much higher industrial participation and technology sharing than Boeing and as such had the support of Brazil's aviation industry. That cannot be underestimated, and it's why Boeing was at a disadvantage even before the NSA story broke.
The Saab Gripen met Brazil's FX-2 requirements, it has a lower operating cost than the Rafale or Super Hornet, Saab has agreed to transfer a massive amount of technology and Sweden has committed to investigate a quid pro quo acquisition of Brazilian KC-390 tanker transports. Boeing could not match all that.