[FEN "8/8/1k5K/8/1p1N4/8/p7/8 w - - 0 1"]
I had KPP material and my opponent had KN. My time ran out and I lost the game. Shouldn't this have been a draw?
FIDE laws of chess: https://www.fide.com/FIDE/handbook/LawsOfChess.pdf
"6.9 Except where one of the Articles: 5.1.a, 5.1.b, 5.2.a, 5.2.b, 5.2.c applies, if a player does not complete the prescribed number of moves in the allotted time, the game is lost by the player. However, the game is drawn, if the position is such that the opponent cannot checkmate the player’s king by any possible series of legal moves."
So as long as there is a way to checkmate the opponent, them timing out constitutes a win for a player. Which is the case here, e.g.:
[FEN "8/8/1k5K/8/1p1N4/8/p7/8 b - - 0 1"]
[StartFlipped "0"]
1... Ka5 2. Kg5 Ka4 3. Kf4 Ka3 4. Ke3 Kb2 5. Kd2 Ka1 6.Kc1 b3 7.Nxb3#
well, technically you could promote to a knight or a bishop and then help your opponent checkmate you (as in Ka1, Bb1; Ka3, Nb3, or Ka1, Nb1; Kb3, Nc2). So the checkmate positions exist, I guess this is why it was not a draw. Whether this is fair or not is of course a totally different question.
This is how this situation is handled on different sites:
In FIDE OTB games (over-the-board) the following rules apply:
If a players flag falls, and he can be mated anyhow, then he loses. Otherwise it is a draw.
In standard and rapid time controls, but not in blitz, a player can claim draw before his flag falls, if his opponent "can not make progress by normal means".
In online chess things need to happen automated. Some sites like Lichess have millions of games per day, so it would be unmanageable to have human intervention.
All sites declare draw in the simple cases like K against K(B or N). Lichess also includes some more advanced cases like K(Q)* against KN and K(R)* against KB.
No site detects all cases where mate is not possible. It is an unsolved technical challenge. All non-trivial cases where mate is not possible will incorrectly be counted as loss in online chess. That's life.
chess.com, ICC and less frequented sites always declare draw when the player has just knight or bishop. On ICC, if a forced mate was possible, one can later claim to get the points, but not the win.
Lichess, chess24 and schach.de apply the above FIDE blitz rules. The above chess.com example would be a loss for white on these sites.
Under the old rules of chess, this configuration would be sufficient for a material tie to be considered. However, I believe that these rules have been updated and, while there is the possibility of checkmate, there is no way to consider the technical tie.