How can I check the hash of a bitcoin block?
Seems to me that you are hashing the whole block instead of header only. Take my code (in C++). 

void test ( )
{
  const MyByteArray header ( QByteArray::fromHex (
     "00000020" // version
     "164a1e4a7f34b96b0e201dcc6a623c63fe3874696e4875000000000000000000" // prev hash
     "49de8b4f4bfa9fc890d3d28a93156a111f891dc680090cd497b58a7d5c2b09cf" // merkle
     "2f62345a"      // timestamp
     "edb00018"      // bits
     "ffdfd257" ) ); // nonce
  const MyKey32 key ( header.sha256d ( ) );
  qDebug ( ) &lt;&lt; key.toString ( );
}


and the output is:

000000000000000000677c4077da7c9f01dde5f332ba2fbff962ee699714d5da