I find ottos to be hard to aclimate to new conditions and a 2.6g tank does not leave much room for error. We are not likely to find out why they died but can make some guesses. The N > 40 ppm is the first thing that caught my eye.
Even though the tank is 3 months old, we do not know how it was cycled and what kept the bacteria alive. An ammonia spike coupled with high pH in a nano tank is one possibilty. A WC with non treated water is another. Disturbance of accumulated mulm or non treated rotting driftwood is yet another. So would be a big difference in temperature.
In short, there is little information on the state of the tank to narrow the possible causes down.