IMP scoring: Win the ♥A, draw trumps, cash the ♦ A K and exit a heart. Assuming West has the ♥Q, the only way you can go down is if East has ♦Q x x and West the ♣A, in which case no line works. If East has any other diamond holding, and West the ♥Q, you cannot go down.
Matchpoint scoring: Are you willing to risk your contract for an overtrick or two? The risk involves winning the ♥A, drawing trumps, and leading a diamond to the king and a diamond to the jack, assuming West follows. If West has the ♦Q x x, you will make at least one overtrick, possibly two if East has the ♣A.
In addition, if West has ♦Q x x x (x), you win the third diamond with dummy’s ace, ruff a diamond and exit a heart, endplaying West to make an overtrick.
The finesse line loses when East has ♦Q x x x and West the ♣A. Now you go down on an ice-cold hand. Welcome to the world of duplicate bridge.
The bottom line: At matchpoints, the chances of an overtrick or two are promising enough to risk your contract by taking the diamond finesse. You don’t win or place in matchpoint tournaments by playing safe on hands like this.