Hi. I speak European Portuguese so might be able to help
I wouldn't go as far to say that they are 'very different', but I guess it's comparable to UK/US English. The difference is that Brazilian Portuguese has also been influenced by Brazilian tribal languages as well, so some vocabulary used in Brazil isn't used in Portugal (e.g Abacaxi means pineapple in Brazil but in Portugal we say Ananas. In Brazil Ananas is a type of pineapple). Mainly it's very small things to do with vocabulary. Grammar is the same other than the use of the gerund in Brazil (in Brazil they would say: ele está cantando (meaning he is singing) and in Portugal you would say: ele está a cantar.) There are other things but they're very small. Because Brazilian media exists in Portugal too (tv programmes etc.) most European Portuguese speakers/Brazilian Portuguese speakers are used to hearing the two dialects, and they understand perfectly (as an American understands a Brit).
I was brought up with European Portuguese and a rarely exposed to Brazilian Portuguese, but understand it just fine.
In terms of what you should learn, it really doesn't matter. If you're planning on staying in Europe then European Portuguese, and if you're planning on going to the US/South America then learn Brazilian Portuguese. From what I've heard (and believe) European Portuguese is probably 'harder' for foreigners, as it's more difficult to pronounce, and there are a lot of contractions which make it difficult to follow. Brazilian Portuguese sounds more like Spanish, and apparently European Portuguese sounds like Russian (search on Youtube and judge haha). Some of the harsh sounds in European Portuguese are softened in Brazil, so Brazilian Portuguese might be easier, but don't see it as a huge difference.
European Portuguese is probably 'better', in that Portugal is nearer to the UK than Brazil, and so Portugal (being in the EU) is probably more 'relevant' to the UK. European Portuguese is the standard Portuguese spoken in Portuguese-speaking countries in Africa too, so it's not just Portugal. The Spanish taught in the UK is European Spanish rather than South American, though I doubt it makes much of a difference. Same with Portuguese. Learn one and you can easily adapt to the other.
Good luck!