There’s many ways to this, like getting epoch millis, calculating the difference and then converting back into the units you need. With java.time apis and java.time.temporal.ChronoUnit you can calculate the difference between 2 LocalDateTime instances easily in one step with:
long elapsedMins = ChronoUnit.MINUTES.between(start, end);
I was looking for a refresher on how to do this and found my own post from 3 years ago in a Google search here (funny when that happens).