Another solution that works for a different first Black King move. 1.d4 Kg4
2.e4+ Kh4. 3.g3#. After 1.d4 Kg4. 2.Qd3 no longer works due to 2....Kh5.
3.Qh3+ doesn't mate due to Black's escape square of 3....Kg6. If 3.Qf5+ or 3.Qf3+ 3....Kh4. If 3.Qh7+ Kg4. If 3.g4+ Kh4 or 3...Kxg4. If 3.Qg3?? Black is happily stalemated.
White has a slight advantage in the position below!!!! But can you mate Black in 3 moves?